-
Notifications
You must be signed in to change notification settings - Fork 24.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify checksums on merge #7360
Conversation
[[index-checksum-on-merge]]`index.checksum_on_merge`:: | ||
|
||
Should merging first validate checksums on segments being merged? | ||
Defaults to `false`. This is a dynamic setting. coming[1.4.0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be "Added [1.4.0]"? No one will see this in official docs until then right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaik coming is automatically changed to added during the release process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow, didn't know that...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah at this point we build our docs from the 1.x branch so your chance as immediate effect. It will be moved to added
once we release it.
This looks good. Just a minor comment on the docs. |
@@ -113,6 +113,7 @@ public void setUp() throws Exception { | |||
super.setUp(); | |||
defaultSettings = ImmutableSettings.builder() | |||
.put(InternalEngine.INDEX_COMPOUND_ON_FLUSH, getRandom().nextBoolean()) | |||
.put(InternalEngine.INDEX_CHECKSUM_ON_MERGE, getRandom().nextBoolean()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a test that also checks that the live change works. Since you missed to register the setting in
org.elasticsearch.index.settings.IndexDynamicSettingsModule
such a test should fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I really wanted this too. I was beaten back by the fact that tests for any of the other IndexWriter options are integration tests (indexing stuff and looking at number of segments etc), instead of simply being unit tests that check that IWC was changed.
I updated this with a test extending simon's new base class, changing default to true. |
LGTM |
can you change the name of the issue to reflect the fact that we enable this feature rather than adding an option. Other than that LGTM thanks rob |
Enable lucene verification of checksums on segments before merging them. This prevents corruption from existing segments from silently slipping into newer merged segments. Closes #7360
Enable lucene verification of checksums on segments before merging them. This prevents corruption from existing segments from silently slipping into newer merged segments. Closes #7360
This just exposes the current lucene option
checkIntegrityAtMerge
from LiveIndexWriterConfig. When enabled, all parts of the index are verified before merging.