Skip to content

Conversation

@dnhatn
Copy link
Member

@dnhatn dnhatn commented Jan 17, 2025

Currently, ES|QL ExecutionInfo is updated in multiple places: on remote clusters, during the execution of data-node requests, in compute listeners, and on the coordinator node. This change consolidates updates to happen only on the coordinator, when receiving compute responses. This change should also make the compute listener easier to understand.

@dnhatn dnhatn marked this pull request as ready for review January 17, 2025 21:29
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jan 17, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@dnhatn dnhatn requested a review from costin January 17, 2025 21:40
@quux00
Copy link
Contributor

quux00 commented Jan 22, 2025

I've started reviewing, but can we hold off merging until Stas' PR merges, as we want to get those features in 8.18 - then this refactoring will need to encompass those changes as well.

@dnhatn
Copy link
Member Author

dnhatn commented Jan 22, 2025

@quux00 I think either PR can be merged first. If this one gets merged first, I can help update Stas' PR, which should be quick. I'll need this change for the retry implementation. Thanks!

@dnhatn
Copy link
Member Author

dnhatn commented Jan 22, 2025

@quux00 @smalyshev We need this PR to fix an issue in Stas's PR, so it needs to be merged first. Once it's in, I'll update Stas's PR.

@dnhatn dnhatn removed the request for review from costin January 22, 2025 17:50
quux00
quux00 previously approved these changes Jan 22, 2025
Copy link
Contributor

@quux00 quux00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clean and elegant refactoring. I left one comment so far. I plan to go over it again and make sure I get the flow.

profiles,
took,
dataNodeResult.totalShards(),
dataNodeResult.totalShards() - dataNodeResult.skippedShards(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In _search, I believe skipped shards are also considered successful. Do we want to preserve that behavior in ES|QL or have this new model?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ I pushed 73bb319

@quux00 quux00 dismissed their stale review January 22, 2025 19:38

Didn't mean to approve yet.

* of ESQL that does not record and return CCS metadata. Ensure that the local cluster {@link EsqlExecutionInfo}
* is properly updated with took time and shard info is left unset.
*/
public void testAcquireComputeCCSListenerWithComputeResponseFromOlderCluster() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need some variant of this test even with the new refactored code?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need these tests in the ComputerListener. I'll try adding unit tests for the ClusterComputeHandler instead. Can I defer this to a follow-up to unblock Stas's PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, sounds good. I approved the PR.

Copy link
Contributor

@quux00 quux00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

@dnhatn dnhatn added the auto-backport Automatically create backport pull requests when merged label Jan 22, 2025
@dnhatn
Copy link
Member Author

dnhatn commented Jan 22, 2025

@quux00 Thanks for reviewing.

@dnhatn dnhatn merged commit d7c2320 into elastic:main Jan 22, 2025
16 checks passed
@dnhatn dnhatn deleted the compute-listener branch January 22, 2025 21:39
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

dnhatn added a commit to dnhatn/elasticsearch that referenced this pull request Jan 22, 2025
Currently, ES|QL ExecutionInfo is updated in multiple places: on remote 
clusters, during the execution of data-node requests, in compute
listeners, and on the coordinator node. This change consolidates updates
to happen only on the coordinator, when receiving compute responses.
This change should also make the compute listener easier to understand
elasticsearchmachine pushed a commit that referenced this pull request Jan 22, 2025
Currently, ES|QL ExecutionInfo is updated in multiple places: on remote 
clusters, during the execution of data-node requests, in compute
listeners, and on the coordinator node. This change consolidates updates
to happen only on the coordinator, when receiving compute responses.
This change should also make the compute listener easier to understand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged >refactoring Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants