-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Fix default value of ignore_unavailable for snapshot REST API (#25359) #27056
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
@abeyad Could you please review this? Thanks in advance. |
@elasticmachine please test this. |
077b167
to
1694583
Compare
@dnhatn I rebased and get test passed. Please test again. |
@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.
Indeed, the REST API is not aligned with the defaults of the transport client. I have made a suggestion that makes sure they're always aligned. Can you also fix RestoreSnapshotRequest?
@@ -402,7 +403,7 @@ public CreateSnapshotRequest source(Map<String, Object> source) { | |||
includeGlobalState = nodeBooleanValue(entry.getValue(), "include_global_state"); | |||
} | |||
} | |||
indicesOptions(IndicesOptions.fromMap((Map<String, Object>) source, IndicesOptions.lenientExpandOpen())); | |||
indicesOptions(IndicesOptions.fromMap(source, IndicesOptions.strictExpandOpen())); |
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 this should be fixed by falling back to indicesOptions
instead (which is equal to IndicesOptions.strictExpandOpen()
by default)
Thanks for the quick update. Can you also add a REST test in
For now, you can specify "-6.99.99", I will take care about changing it once we decide on backporting this PR. Finally can you update the PR title and description? Thanks a lot! |
@ywelsch Thanks. I updated the REST test. Hope it makes sense. |
@elasticmachine retest this please |
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 again @liketic. I took the liberty of editing the PR description and will merge this soon.
The default value for ignore_unavailable did not match what was documented when using the REST APIs for snapshot creation and restore. This commit sets the default value of ignore_unavailable to false, the way it is documented and ensures it's the same when using either REST API or transport client. Closes #25359
The default value for ignore_unavailable did not match what was documented when using the REST APIs for snapshot creation and restore. This commit sets the default value of ignore_unavailable to false, the way it is documented and ensures it's the same when using either REST API or transport client. Closes #25359
* master: Stop skipping REST test after backport of #27056 Fix default value of ignore_unavailable for snapshot REST API (#27056) Add composite aggregator (#26800) Fix `ShardSplittingQuery` to respect nested documents. (#27398) [Docs] Restore section about multi-level parent/child relation in parent-join (#27392) Add TcpChannel to unify Transport implementations (#27132) Add note on plugin distributions in plugins folder Remove implementations of `TransportChannel` (#27388) Update Google SDK to version 1.23 (#27381) Fix Gradle 4.3.1 compatibility for logging (#27382) [Test] Change Elasticsearch startup timeout to 120s in packaging tests Docs/windows installer (#27369)
The default value for
ignore_unavailable
did not match what was documented when using the REST APIs for snapshot creation and restore. This PR sets the default value ofignore_unavailable
tofalse
, the way it is documented and ensures it's the same when using either REST API or transport client.Closes #25359