-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inactive shard flush should wait for ongoing one (#89430)
Inactive shard flush should wait for ongoing one org.elasticsearch.indices.flush.FlushIT#testFlushOnInactive would sometimes fail in the following case: * SHARD_MEMORY_INTERVAL_TIME_SETTING is set very low, e.g., 10ms * The regularly scheduled multiple flushes proceed to org.elasticsearch.index.shard.IndexShard#flushOnIdle * There, the first flush will handle e.g., the first document that was indexed. The second flush will arrive shortly after, before the first flush finishes. * The second flush will find that wasActive = true (due to the indexing of the remaining documents), and will set it to false. * However, the second flush will not be executed because waitIfOngoing = false, and there is the ongoing first flush. * No other flush is scheduled (since any next regularly scheduled flush will find wasActive = false), which creates the problem. Solution: if a flush request does not happen, revert active flag, so that a next flush request can happen. Fixes #87888
- Loading branch information
Showing
7 changed files
with
110 additions
and
12 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
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
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
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