-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
CCR: mention how to enable soft deletes in error message when not enabled #36476
CCR: mention how to enable soft deletes in error message when not enabled #36476
Conversation
Pinging @elastic/es-distributed |
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.
LGTM - Do think tests need to be adjusted because of this change. (LocalFollowIndexIT#testDoNotCreateFollowerIfLeaderDoesNotHaveSoftDeletes(...)
and TransportResumeFollowActionTests#testValidation(...)
)
Thanks @martijnvg, I was optimistically relying on CI to be bubble up tests that rely on this string (if at all). Thanks for the heads up. |
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.
🙏
@@ -124,7 +124,8 @@ private void createFollowerIndex( | |||
} | |||
if (leaderIndexMetaData.getSettings().getAsBoolean(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), false) == false) { | |||
listener.onFailure( | |||
new IllegalArgumentException("leader index [" + request.getLeaderIndex() + "] does not have soft deletes enabled")); | |||
new IllegalArgumentException("leader index [" + request.getLeaderIndex() + "] does not have soft deletes enabled." + | |||
"soft deletes must be enabled when the index is created by setting index.soft_deletes.enabled to true")); |
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.
Please use IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey()
so we have fewer places we have to search the code base for the hard string for, if ever we need to.
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.
doh. Should have done this from the get go.
c520ed1
to
a3af273
Compare
check this please |
@martijnvg @jasontedor FYI - I rebased this against 6.x . With the merge of #36141 which enables soft deletes as a default, I don't think this makes sense for master any more. |
No description provided.