Posted on 12/05/2021 21:48:52
Hi,
Please see attached video reproducing issue.
On a 9.10.8 site there is an issue with OrderLines not being removed if they are not in the import when order provider destination setting feature "Remove missing order lines" is selected.
When an order is placed from the frontend, the record can be viewed in the database and exports successfully. After the order had been brought back on the Import Orders the issue occurs. What is occuring is that the DW OrderLineId, OL*, is created and exported to ERP. When the order syncs back from the ERP the import XML has ONLY the ERP OrderLineId of #_#. The feature to "Remove missing order lines" should impor the new ERP OrderLineId and remove the DW generated OrderLineId. However, both orderlines are remaining on the order.
If you run the data integration job directly the feature works as expected.
Here is the troubleshooting findings thus far:
- It occurs on the import and is irrelevant of if the order is a first time or edit
- If you run the export then import in close succession you increase the chances of the issue occurring. We can repro about 9/10 times when running in close succession.
- If you run the export recycle the site and run the import you cannot repro the issue (suggests caching for sure)
- If you run the import twice in a row in quick succession to the export you often see the issue on the first import but never the second (further points to caching and race condition)
- If you run the data integration job the issue is never able to be reproduced
- If you pull the order with a primary key filter you can still repro the issue if you keep the order of operation the same
- If you leave a large gap of time between the export and import the repro is not showing
- If you clear the cache in the website (not a full restart just a break) we are still seeing the repro
Next we put a debugger on the solution and break point at the "Remove missing order lines" SQL query in the order provider. We found the query is working as expected. We did see a killall in the provider code for cache busting. We think we saw that the issue was not in the "Remove missing order lines" piece of the order provider but was pointing up to the runner method.
Does anyone know why this would be occuring or thoughts to further help?
Thanks,
Shawn