akeneo / magento2-connector-community

Akeneo Connector for Magento 2
Open Software License 3.0
81 stars 88 forks source link

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

Open gauravharshranosys opened 1 year ago

gauravharshranosys commented 1 year ago

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 INTOcatalog_product_entity_int(attribute_id,store_id,value,row_id) SELECT XX ASattribute_id, X ASstore_id,tmp_akeneo_connector_entities_product.XXXASvalue,p.row_idFROMtmp_akeneo_connector_entities_product LEFT 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