magento2-connector-community icon indicating copy to clipboard operation
magento2-connector-community copied to clipboard

Integrity constraint violation: 1062 Duplicate entry 'XXXX-XXX-X' for key 'CATALOG_PRODUCT_ENTITY_VARCHAR_ROW_ID_ATTRIBUTE_ID_STORE_ID'

Open gauravharshranosys opened this issue 1 year ago • 0 comments

Environment and configuration

  1. Adobe Commerce Cloud - 2.4.4
  2. Akeneo - 103.2.1

Steps to reproduce

  1. When I am trying to sync products import, I am getting frequent error like below : SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'XXXX-XX-X' for key 'CATALOG_PRODUCT_ENTITY_INT_ROW_ID_ATTRIBUTE_ID_STORE_ID', query was: INSERT INTO catalog_product_entity_int (attribute_id, store_id, value, row_id) SELECT XX AS attribute_id, X AS store_id, tmp_akeneo_connector_entities_product.XXXASvalue, p.row_idFROMtmp_akeneo_connector_entities_productLEFT JOINcatalog_product_entityASpON _entity_id = p.entity_id LEFT JOINstaging_updateASsON p.created_in = s.id WHERE (s.is_rollback = 1 OR s.id IS NULL) ON DUPLICATE KEY UPDATEattribute_id = VALUES(attribute_id), store_id = VALUES(store_id), value = VALUES(value), row_id = VALUES(row_id)

This keeps on happening for varchar and both int attributes. I checked in the database that the value for specific attributes and entity_id/row_id is already there still akeneo is trying to put a new row in catalog_product_entity_varchar/catalog_product_entity_int Why akeneo is identifying it as a new value and adding it ?

Expected result

  1. The product sync should be completed.

Actual result

  1. Getting error image

gauravharshranosys avatar Mar 09 '23 12:03 gauravharshranosys