|
After further discussion, we consider this a design defect.
Currently the ExternalOrderLoader creates the import entry in initial status and then commits the transaction, and after that continues with the process. If the process ends correctly, it then changes the import entry to Success status, and otherwise it changes it to Error.
The import entries were left in Initial status in this case because the customer environment was suffering a problem, and the database ran out of available connections at some point. This meant that the import entries had been created, the process then failed, and as there were no available connections, it could not change them to Error status.
Therefore, the problem could be avoided simply by removing the commit that creates the import entry, so that if the same problem happens the import entries would not be created, or would be left in error.
However, the commit is there for a reason: it was added to prevent cases of duplicated requests adding unnecessary work to the server, and even more, to prevent very ugly cases of integrations with external systems being executed twice.
Therefore, we currently believe that the potential risk of doing this change doesn't offset the small benefit of avoiding this quite harmless problem that so far has happened only twice, and that has the very simple solution of just removing the generated import entries manually. |
|