-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Deprecate support for first line empty in msearch API #41442
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
Deprecate support for first line empty in msearch API #41442
Conversation
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
|
Pinging @elastic/es-search |
jimczi
left a comment
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 @javanna, I left one comment
| // support first line with \n | ||
| if (nextMarker == 0) { | ||
| from = nextMarker + 1; | ||
| deprecationLogger.deprecated("support for empty first line in msearch API is deprecated and will be removed"); |
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 wonder if this is not misleading. In this version the first line is just ignored while in master we'll consider it as an empty action so I think that the message here should be more explicit.
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 agree it is misleading. yet I believe it will be regardless of the message that we come up with, because it is a weird change. we want to drop supporting an empty first line in case it does not represent an empty action metadata line, while we want to be able to support empty lines for action metadata lines in the first row
|
@jimczi I have revised the deprecation message, hopefully it is a bit clearer now. |
jimczi
left a comment
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 for updating, LGTM
| if (nextMarker == 0) { | ||
| from = nextMarker + 1; | ||
| deprecationLogger.deprecated("support for empty first line before any action metadata in msearch API is deprecated and " + | ||
| "will be removed"); |
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.
nit: will be removed in the next major version ?
With #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 #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
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
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 #41011