Skip to content
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

Support multi-coordinator while serving task info #18146

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

asjadsyed
Copy link
Member

@asjadsyed asjadsyed commented Aug 5, 2022

Summary:

The /v1/taskInfo/{taskId} endpoint serves task info available within a particular coordinator.

With multi-coordinator, if a different coordinator is running the query, the endpoint currently returns 404. This leads to a broken UI under multi-coordinator, so fixing this issue will help with debugging. This PR fixing this by enabling the endpoint to retrieve cluster-wide task info.

We do this by implementing a proxying endpoint /v1/taskInfo/{taskId} in the resource manager: if the query isn't available on the queried coordinator, the coordinator will proxy the request to the RM, which will proxy it to the right coordinator.

We also prevent an infinite-loop situation where the RM and coordinator could end up handing the request back and forth in case the coordinator no longer has info about the query, which might happen if the query was recently finished. The RM avoids the situation by adding a query parameter to let the coordinator know not to proxy it back again.

This PR is very similar to #16163, which fixed this issue for /v1/queryState/*. DistributedTaskInfoResource is to TaskInfoResource as DistributedQueryInfoResource is to QueryStateInfoResource.

Test plan:

I've added a unit test (based off of TestDistributedQueryInfoResource) which starts a query on one coordinator and verifies we can retrieve the taskInfo on the second coordinator.

Release Notes:

== NO RELEASE NOTE ==

@asjadsyed asjadsyed marked this pull request as ready for review August 5, 2022 17:33
@asjadsyed asjadsyed requested a review from a team as a code owner August 5, 2022 17:33
@asjadsyed asjadsyed force-pushed the asjadsyed_disagg_pti branch 2 times, most recently from a9616e7 to ff9118a Compare August 5, 2022 20:47
@tdcmeehan
Copy link
Contributor

LGTM % @swapsmagic feedback

Copy link
Contributor

@ajaygeorge ajaygeorge left a comment

Choose a reason for hiding this comment

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

Mostly good. Left some comments.

@asjadsyed asjadsyed requested review from a team, vinothchandar and 7c00 as code owners October 20, 2022 21:40
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 20, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: asjadsyed / name: Asjad Syed (f1d22bf2e6587d4894fdb9e82d04c8031ec8563f)

@asjadsyed asjadsyed force-pushed the asjadsyed_disagg_pti branch 7 times, most recently from 72c7b3c to d43d33c Compare October 21, 2022 22:16
Copy link
Contributor

@ajaygeorge ajaygeorge left a comment

Choose a reason for hiding this comment

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

Some more comments

@asjadsyed asjadsyed force-pushed the asjadsyed_disagg_pti branch 5 times, most recently from 7eababb to 07fe3e1 Compare October 28, 2022 21:12
Copy link
Contributor

@ajaygeorge ajaygeorge left a comment

Choose a reason for hiding this comment

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

LGTM % couple of comments

@asjadsyed asjadsyed force-pushed the asjadsyed_disagg_pti branch 8 times, most recently from 835a949 to 857b8ea Compare November 2, 2022 18:56
@tdcmeehan tdcmeehan merged commit ea8ea14 into prestodb:master Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants