BUGFIX: Bypass async queue during bulk index builds#61
Open
paavo wants to merge 1 commit intoFlowpack:masterfrom
Open
BUGFIX: Bypass async queue during bulk index builds#61paavo wants to merge 1 commit intoFlowpack:masterfrom
paavo wants to merge 1 commit intoFlowpack:masterfrom
Conversation
When indexNamePostfix is set (during nodeindex:build), index and remove nodes directly via parent methods instead of queuing async jobs. This ensures bulk builds index synchronously into the correct postfixed index. Related: Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor#424
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When enableLiveAsyncIndexing is true and nodeindex:build runs, nodes are queued as async jobs instead of being indexed directly. This means the build finishes and switches the alias before the queue is processed, resulting in an empty or incomplete index.
Fix
When indexNamePostfix is set (indicating a bulk build), bypass the async queue and call parent::indexNode() / parent::removeNode() directly. This ensures bulk builds index synchronously into the correct postfixed index.
Live async indexing (no postfix) remains unchanged.
Companion PR: Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor#425
Related: Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor#424