Parse empty first line in msearch request body as action metadata#41011
Merged
javanna merged 1 commit intoelastic:masterfrom May 1, 2019
Merged
Parse empty first line in msearch request body as action metadata#41011javanna merged 1 commit intoelastic:masterfrom
javanna merged 1 commit intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-search |
cbuescher
approved these changes
Apr 15, 2019
Member
cbuescher
left a comment
There was a problem hiding this comment.
LGTM, I think failing on the second example (empty line and then an empty header line) is something to be expected
Contributor
Author
|
@jimczi do you have thoughts on whether this should be considered a breaking change, hence go to master only, or not? |
Contributor
|
If it's a breaking change we also need to deprecate this format in 7x so would it be possible to log a deprecation warning if the first line is empty in 7x ? It's not a major bug so I guess it's ok to fix only in 8 and warn users about the deprecated format in 7.1 ? |
javanna
added a commit
to javanna/elasticsearch
that referenced
this pull request
Apr 23, 2019
In order to support for empty action metadata in the first msearch item, we need to remove support for prepending msearch request body with an empty line, which prevents us from parsing the empty line as action metadata for the first search item. Relates to elastic#41011
Contributor
Author
javanna
added a commit
that referenced
this pull request
Apr 25, 2019
In order to support empty action metadata in the first msearch item, we need to remove support for prepending msearch request body with an empty line, which prevents us from parsing the empty line as action metadata for the first search item. Relates to #41011
akhil10x5
pushed a commit
to akhil10x5/elasticsearch
that referenced
this pull request
May 2, 2019
With elastic#41442 we have deprecated support for empty line before any action metadata in msearch API. With this commit we remove support for such empty line, in place of parsing it as empty action metadata, which was previously not supported although the following items could have an empty line representing their corresponding action metadata. This way we make all times equal. Relates to elastic#39841
gurkankaymak
pushed a commit
to gurkankaymak/elasticsearch
that referenced
this pull request
May 27, 2019
With elastic#41442 we have deprecated support for empty line before any action metadata in msearch API. With this commit we remove support for such empty line, in place of parsing it as empty action metadata, which was previously not supported although the following items could have an empty line representing their corresponding action metadata. This way we make all times equal. Relates to elastic#39841
pgomulka
added a commit
to pgomulka/elasticsearch
that referenced
this pull request
Jul 30, 2021
The support for this buggy behaviour was removed in elastic#41011 however since this is a change that affects a request shape it should still be available to use it in rest api compatibility relates elastic#51816
pgomulka
added a commit
that referenced
this pull request
Aug 5, 2021
80 tasks
jrodewig
added a commit
that referenced
this pull request
Sep 27, 2021
Adds an 8.0 breaking change for PR #41011
23 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
It looks like when parsing the msearch request body, we allow for the first line to be empty, yet that causes some different treatment for the first line that ends up requiring the action metadata line, while all other lines don't as they can be just empty.
With this change we properly accept the following which we would otherwise reject due to the first line being empty:
but we stop accepting the following (note the empty line before the first action metadata line:
Relates to #39841