-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ESQL: Change queries ID to be the same as the async #127472
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
base: main
Are you sure you want to change the base?
Conversation
Also the individual ID, node, and data node tags. GitHub: Resolves elastic#127187
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Hi @GalLalouche, I've created a changelog YAML for you. |
281b78a
to
de60192
Compare
} | ||
|
||
public static AsyncExecutionId readFrom(StreamInput input) throws IOException { | ||
return decode(input.readString()); |
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.
Worth adding an AbstractWireTestCase
subclass for this then.
@Override | ||
public Status getStatus() { | ||
return status; | ||
} |
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 it's probably worth making this a concrete class with a name and stuff.
Could you put the doc id as a member and return a status that's xcontent renders like:
{
"request_id": "<the encoded request id we'd get from the list api"
}
That way we can see the whole encoded blob in the tasks list api and folks won't wonder what that random thing means in the status?
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 see we don't have the local node id here - but we could pass it in to this method. You'd have to modify the 30 implementers, but I guess that's ok.
@@ -3,6 +3,7 @@ | |||
"id" : 5326, | |||
"type" : "transport", | |||
"action" : "indices:data/read/esql", | |||
"status" : "Ks5ApyqMTtWj5LrKigmCjQ", |
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.
Having this so high in the PR really helped review it!
This PR changes the list and query API for ESQL, such that the ID now follows the same format as async query IDs. This is saved as part of the task status. For async queries, this is easy, but for sync queries, this is slightly more complicated, since when creating them, we don't have access to a node ID. So instead, the status itself is just the doc ID portion of the async execution ID, which is used for salting, since this part needs to be consistent, so that when we list the queries, we can compute the async execution ID correctly.
Also, I've removed the individual ID, node, and data node tags, as mentioned in the ticket.
Resolves #127187