Commerce Data Exporter摘要和變更記錄檔錯誤中未更新的資料
本文提供解決方案,解決在資料匯出工具Mview訂閱中使用錯誤檢視識別碼所造成的資料同步處理問題。 Mview訂閱是用來追蹤資料庫表格的變更。
說明 description
環境
- 產品: Adobe Commerce
- 條件約束:自訂程式碼已套用至資料匯出功能(
commerce-data-exporter或saas-exporter)
問題/症狀
如果安裝的SaaS Data Export版本是103.3.0或更新版本,而且程式碼直接參照catalog_data_exporter_products索引,就會發生錯誤。
商家可能會發現目錄資料匯出工具摘要表格中缺少資料更新,並在cron工作記錄中看到以下錯誤:
[ 2024-05-27T19:00:04.627604+00:00] report.
ERROR: Cron Job
indexer_clean_all_changelogs has an error: Table
catalog_data_exporter_products_cl does not exist. Statistics:
{"sum":0,"count":1,"realmem":0,"emalloc":0,"realmem_start":305135616,"emalloc_start":283210384} [ ] [ ]
原因
由於Commerce Data Export 103.3.0版中的摘要表格、索引和變更記錄表格名稱變更,使用 Commerce Data Export 擴充功能的自訂擴充功能中的 Mview 訂閱可能無法正常運作。
在此情況下,資料表不存在錯誤會發生,因為catalog_data_exporter資料表名稱已變更為cde_products_feed,而且您的自訂程式碼參考了 資料匯出工具Mview 訂閱中的舊名稱。
解決方法 resolution
在自訂延伸模組中,編輯 Mview 組態檔(./etc/mview.xml)以將catalog_data_exporter_products資料表名稱變更為cde_products_feed。
下列範例顯示指定 Mview 訂閱所追蹤之資料表的程式碼:
<view id="cde_products_feed" class="Magento\CatalogDataExporter\Model\Indexer\ProductFeedIndexer" group="indexer">
<subscriptions>
<table name="custom_table" entity_column="product_id" />
</subscriptions>
</view>
相關閱讀
- 適用於SaaS服務的Adobe Commerce Data Export Guide中的SaaS Data Export Extension發行說明
- 在Commerce實作行動手冊中修改資料庫表格的最佳實務
recommendation-more-help
experience-cloud-kcs-help-kbarticles