forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce merging in PersistedClusterStateService (elastic#79793)
When writing the cluster state index we flush a segment every 2000 docs or so, which sometimes triggers merging in the middle of the write process. This merging is often unnecessary since many of the segments being merged would have ended up containing no live docs at the end of the process and hence could have just been deleted. With this commit we adjust the merge policy to be much more relaxed about merging, permitting up to 100 segments per tier, since we only read this index very rarely and not on any hot paths. We also disable merging completely during the write process, checking just before commit to see if any merging should be done. Relates elastic#77466
- Loading branch information
1 parent
edf2306
commit 683d072
Showing
2 changed files
with
119 additions
and
10 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