Repository navigation
Add cfs options - #1050
Open
aprudhomme wants to merge 8 commits into
Open
Add cfs options#1050aprudhomme wants to merge 8 commits into
aprudhomme wants to merge 8 commits into
Conversation
…mmutableIndexState
…ettingsV2 Add two new options to LiveSettingsV2Command to expose Lucene compound-file (CFS) settings: - --noCFSRatio: Fraction of total merged index size below which segments use CFS - --maxCFSSegmentSizeMB: Maximum segment size in MB to use CFS (0 = unlimited) Both settings follow the existing pattern for Double option fields and null checks in the call() method.
Use TieredMergePolicy's default noCFSRatio (0.1) so existing indices keep their current behavior. Document that useCompoundFile only applies to flushed segments, while noCFSRatio/maxCFSSegmentSizeMB control merged ones.
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.
Summary
Adds settings for Lucene's compound file (
.cfs) behavior. Until now nrtsearch always used Lucene's defaults. These settings let you change when segments are written as compound files, or turn compound files off.New settings
useCompoundFiletrueIndexWriterConfig.setUseCompoundFilenoCFSRatio0.1MergePolicy.setNoCFSRatiomaxCFSSegmentSizeMB0(no limit)MergePolicy.setMaxCFSSegmentSizeMBuseCompoundFileapplies to newly flushed segments.noCFSRatioandmaxCFSSegmentSizeMBapply to merged segments. A merged segment is written as a compound file only if it is no larger thannoCFSRatio× total index size and no larger thanmaxCFSSegmentSizeMB.useCompoundFile: falseandnoCFSRatio: 0.0.noCFSRatioandmaxCFSSegmentSizeMBtake effect the next time the index writer is opened.Changes
luceneserver.proto: addedIndexSettings.useCompoundFile(field 9), plusIndexLiveSettings.noCFSRatio(20) andIndexLiveSettings.maxCFSSegmentSizeMB(21)ImmutableIndexState/IndexState: added defaults, validation (noCFSRatioin[0.0, 1.0],maxCFSSegmentSizeMB >= 0), getters, and applied ingetIndexWriterConfig()liveSettingsV2CLI: added--noCFSRatioand--maxCFSSegmentSizeMBindex_settings.rst,index_live_settings.rstTesting
ImmutableIndexStateTestcover defaults, set values, validation, and that values reach theIndexWriterConfig/ merge policyStateBackendServerTestfor the new default fields