From 1003c9bc20ddd41c0c1dc6fe593b822e89dec458 Mon Sep 17 00:00:00 2001 From: Cid Lopes Date: Thu, 16 Jun 2022 16:52:01 +0300 Subject: [PATCH 1/3] Indexer - Prevent duplicates to delete queue --- Model/Service/Update/QueueService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/Service/Update/QueueService.php b/Model/Service/Update/QueueService.php index cb915dbbe..984ab91e3 100644 --- a/Model/Service/Update/QueueService.php +++ b/Model/Service/Update/QueueService.php @@ -151,7 +151,7 @@ public function addIdsToDeleteQueue($productIds, Store $store) $store, $idBatch ); - if (!empty($queueEntry->getProductIds())) { + if (!empty($queueEntry->getProductIds()) && $this->queueRepository->isEntryDuplicated($queueEntry)) { $this->queueRepository->save($queueEntry); // @codingStandardsIgnoreLine } } From 2b8b35c39dbf61d163a7a5a3014d1488f62cd89c Mon Sep 17 00:00:00 2001 From: Cid Lopes Date: Thu, 16 Jun 2022 16:52:42 +0300 Subject: [PATCH 2/3] Indexer - Prevent duplicates to delete queue --- Model/Service/Update/QueueService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/Service/Update/QueueService.php b/Model/Service/Update/QueueService.php index 984ab91e3..1593b7b2a 100644 --- a/Model/Service/Update/QueueService.php +++ b/Model/Service/Update/QueueService.php @@ -151,7 +151,7 @@ public function addIdsToDeleteQueue($productIds, Store $store) $store, $idBatch ); - if (!empty($queueEntry->getProductIds()) && $this->queueRepository->isEntryDuplicated($queueEntry)) { + if (!empty($queueEntry->getProductIds()) && !$this->queueRepository->isEntryDuplicated($queueEntry)) { $this->queueRepository->save($queueEntry); // @codingStandardsIgnoreLine } } From 2801f564adc6cb59d38218b4c7f60e9f7c21bcd4 Mon Sep 17 00:00:00 2001 From: Cid Lopes Date: Wed, 29 Jun 2022 11:32:45 +0300 Subject: [PATCH 3/3] Update version && Changelog --- CHANGELOG.md | 3 +++ Setup/Patch/Data/AddCustomerReference.php | 2 +- Setup/Patch/Data/AlterCustomerReferenceNonEditable.php | 2 +- Setup/Patch/Data/PopulateCustomerReference.php | 2 +- composer.json | 2 +- etc/module.xml | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c95b4a9e..4b0a9c406 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning. +### 6.0.3 +* Indexer - Prevent insertion of duplicated rows to be delete + ### 6.0.2 * Indexer - Reduces completed queue cleanup time to 1 hour instead of 8 * Indexer Sync Service - Uses Magento Product repository to fetch product data in bulk, reducing amount of database queries diff --git a/Setup/Patch/Data/AddCustomerReference.php b/Setup/Patch/Data/AddCustomerReference.php index b05077d1c..7e8a91f88 100644 --- a/Setup/Patch/Data/AddCustomerReference.php +++ b/Setup/Patch/Data/AddCustomerReference.php @@ -157,6 +157,6 @@ public function addCustomerReference() */ public static function getVersion(): string { - return '6.0.2'; + return '6.0.3'; } } diff --git a/Setup/Patch/Data/AlterCustomerReferenceNonEditable.php b/Setup/Patch/Data/AlterCustomerReferenceNonEditable.php index abac1b00d..f25393dce 100644 --- a/Setup/Patch/Data/AlterCustomerReferenceNonEditable.php +++ b/Setup/Patch/Data/AlterCustomerReferenceNonEditable.php @@ -120,6 +120,6 @@ public function alterCustomerReferenceNonEditable() */ public static function getVersion(): string { - return '6.0.2'; + return '6.0.3'; } } diff --git a/Setup/Patch/Data/PopulateCustomerReference.php b/Setup/Patch/Data/PopulateCustomerReference.php index 9a36489e3..33f1a91c1 100644 --- a/Setup/Patch/Data/PopulateCustomerReference.php +++ b/Setup/Patch/Data/PopulateCustomerReference.php @@ -144,6 +144,6 @@ public function populateCustomerReference() */ public static function getVersion(): string { - return '6.0.2'; + return '6.0.3'; } } diff --git a/composer.json b/composer.json index e542b065f..93d4553a7 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "nosto/module-nostotagging", "description": "Increase your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.", "type": "magento2-module", - "version": "6.0.2", + "version": "6.0.3", "require-dev": { "phpmd/phpmd": "^2.5", "sebastian/phpcpd": "*", diff --git a/etc/module.xml b/etc/module.xml index 405ed1886..a0fc13016 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -37,5 +37,5 @@ - +