-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Parse empty first line in msearch request body as action metadata #41011
Conversation
Pinging @elastic/es-search |
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, I think failing on the second example (empty line and then an empty header line) is something to be expected
@jimczi do you have thoughts on whether this should be considered a breaking change, hence go to master only, or not? |
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 ? |
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
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
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
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
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
Adds an 8.0 breaking change for PR #41011
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