-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Remove local parameter for get field mapping request #55100
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ea685c4
Remove local parameter for get field mapping request
ywangd c9661d8
Add migration notes for the local parameter removal
ywangd aa86387
Merge remote-tracking branch 'origin/master' into remove-get-field-ma…
ywangd e994ce0
Remove extra blank line
ywangd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,8 +39,6 @@ | |
| */ | ||
| public class GetFieldMappingsRequest extends ActionRequest implements IndicesRequest.Replaceable { | ||
|
|
||
| protected boolean local = false; | ||
|
|
||
| private String[] fields = Strings.EMPTY_ARRAY; | ||
|
|
||
| private boolean includeDefaults = false; | ||
|
|
@@ -59,26 +57,17 @@ public GetFieldMappingsRequest(StreamInput in) throws IOException { | |
| if (types != Strings.EMPTY_ARRAY) { | ||
| throw new IllegalArgumentException("Expected empty type array but received [" + Arrays.toString(types) + "]"); | ||
| } | ||
|
|
||
| } | ||
| indicesOptions = IndicesOptions.readIndicesOptions(in); | ||
| local = in.readBoolean(); | ||
| // Consume the deprecated local parameter | ||
| if (in.getVersion().before(Version.V_8_0_0)) { | ||
| in.readBoolean(); | ||
| } | ||
| fields = in.readStringArray(); | ||
| includeDefaults = in.readBoolean(); | ||
| } | ||
|
|
||
| /** | ||
| * Indicate whether the receiving node should operate based on local index information or forward requests, | ||
| * where needed, to other nodes. If running locally, request will not raise errors if running locally & missing indices. | ||
| */ | ||
| public GetFieldMappingsRequest local(boolean local) { | ||
| this.local = local; | ||
| return this; | ||
| } | ||
|
|
||
| public boolean local() { | ||
| return local; | ||
| } | ||
|
|
||
| @Override | ||
| public GetFieldMappingsRequest indices(String... indices) { | ||
| this.indices = indices; | ||
|
|
@@ -133,7 +122,9 @@ public void writeTo(StreamOutput out) throws IOException { | |
| out.writeStringArray(Strings.EMPTY_ARRAY); | ||
| } | ||
| indicesOptions.writeIndicesOptions(out); | ||
| out.writeBoolean(local); | ||
| if (out.getVersion().before(Version.V_8_0_0)) { | ||
| out.writeBoolean(true); | ||
| } | ||
|
Comment on lines
+125
to
+127
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here as well, not needed if the request never goes across nodes. |
||
| out.writeStringArray(fields); | ||
| out.writeBoolean(includeDefaults); | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is not necessary if we can be sure that the request never goes across wire.