-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Normalized prefix for rollover API #57271
Conversation
It fixes the issue elastic#53388 by normalizing prefix at index creation request itself
Pinging @elastic/es-core-features (:Core/Features/ILM+SLM) |
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.
Thanks for fixing this @Gaurav614! I left a couple of comments, if you could address those then I will merge this in
@@ -154,7 +154,7 @@ public void testRolloverWithIndexSettings() throws Exception { | |||
indexDoc("test_index-2", "1", "field", "value"); | |||
flush("test_index-2"); | |||
final Settings settings = Settings.builder() | |||
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1) | |||
.put("number_of_shards", 1) // testing without "index" prefix |
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 I'd prefer a dedicated test for this, just so that it doesn't get accidentally removed and the behavior reverted in the future, could you add a test for this? (it can basically be a copy of this test with a descriptive name)
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.
Good suggestion, made a separate test case for it !
@@ -306,12 +303,20 @@ public void onFailure(String source, Exception e) { | |||
}); | |||
} | |||
|
|||
private void applyCreateIndexRequestInternal(CreateIndexClusterStateUpdateRequest createIndexClusterStateRequest){ |
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.
Calling this "apply" I think is a little misleading, I think normalizeRequestSettings
would be a better name for this method
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.
Ack.
@elasticmachine ok to test |
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, thanks for the changes @Gaurav614, I'll take care of merging and backporting this.
@elasticmachine ok to test |
Looks like checkstyle is unhappy about this line:
@Gaurav614 can you shorten the line to < 140 characters? |
Oops!! I ran gradle target for check style check and it was successful.
|
@elasticmachine ok to test |
@elasticmachine update branch |
Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Lee Hinman <[email protected]> It fixes the issue elastic#53388 by normalizing prefix at index creation request itself
* Normalized prefix for rollover API (#57271) Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Lee Hinman <[email protected]> It fixes the issue #53388 by normalizing prefix at index creation request itself * Fix compilation for backport Co-authored-by: Gaurav Chandani <[email protected]>
It fixes the issue #53388
by normalizing prefix at index creation request itself
gradle check
?