-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(elasticsearch-plugin): Execute all bulk index updates at once
Previously, Elasticsearch bulk update operations were scattered throughout the execution of a method e.g. `updateProductsInternal` would bulk delete products, bulk update variants, bulk insert products. Between each of these bulk operations there was async DB queries. This intervening time allowed for race conditions to creep in which manifested as non-deterministically failing e2e tests. In real-world usage it may not have been noticeable, but in any case this commit groups _all_ batch operations together, and only at the very end of the method, all batch operations are passed to ES at once.
- Loading branch information
1 parent
9a20028
commit 06da6d5
Showing
2 changed files
with
139 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters