-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
This issue is automatically created based on existing pull request: #36241: Fix order spam when search engine is down
Description (*)
Orders can be spammed if the search engine service is down and the Catalog Search index mode is set to Update on Save.
This is caused by an unhandled exception on the "Magento\CatalogInventory\Observer\ReindexQuoteInventoryObserver" observer for the "sales_model_service_quote_submit_success"event. The exception is caused because both price and stock catalog re-indexation trigger a fulltext re-index. The solution I found was to handle the exception during the observer execution and invalidate the offending indexes for later re-indexation.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
- Add to cart
- Go checkout page
- Disable Elasticsearch service (Elasticsearch suddenly stop working)
- Click Place Order button
Expected result
The order is placed without any issues and both Produce Price and Stock Indexes should be invalidated (reindex required in the admin dashboard).
Questions or comments
One of the items listed in the expected scenario proposed in the issue ("Admin should not be able to do invoice,shipping etc.") should not be considered since the order can be placed correctly when the search engine is not working and the issue with the order spamming can be resolved by correctly handling the exception thrown after the order is already placed.
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status