-
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
Make XContentBuilder in AliasActions build is_write_index
field
#35071
Conversation
Pinging @elastic/es-core-infra |
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.
thank you @upgle for contributing this fix and bringing it to our attention!
Rest High Level Client was missed here.
Your changes look good, but I think they are missing three things
- the IndicesClientIT changes would benefit from randomization
- The IndicesAliasesRequest's hashCode/toString/equals are also missing writeIndex
- Add test on the server-side for IndicesAliasesRequestTests, where toXContent is tested. This means updating RandomAliasActionsGenerator.java to randomly include writeIndex.
I've addressed these concerns in a commit to make it clearer: talevy@b72608d
thanks!
Hi @talevy, Thank you for your kind comments. |
thank you for for the update, I will run our continuous integration test suite against this to double check we didn't miss anything |
@elasticmachine, test this please |
c167803
to
245b473
Compare
@talevy
|
@talevy
I think we need to retry integration test again. This seems to be caused by this issue. 6256c33 |
thanks for applying the rebase. I will rerun the tests |
@elasticmachine, test this please |
Hi @talevy, test is just passed 🎉 |
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.
thank you @upgle! I'll go ahead and merge this into the appropriate branches
…5071) Make XContentBuilder in AliasesActions build `is_write_index` field
…5071) Make XContentBuilder in AliasesActions build `is_write_index` field
…5071) Make XContentBuilder in AliasesActions build `is_write_index` field
Alias 'is_write_index' feature was introduced in 6.4 version. but, toXContent method of AliasActions does not build for
is_write_index
field.so
is_write_index
can not be set with IndicesAliasesRequest (RestHighLevelClient)You can see it in the code below.
elasticsearch/server/src/main/java/org/elasticsearch/action/admin/indices/alias/IndicesAliasesRequest.java
Line 448 in 237650e
Sample of RestHighLevelClient
It does not set
is_write_index
despite specifying options withwriteIndex
chaining method.Notes