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

add query cancel sync for presto forward #41

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yabinma
Copy link
Member

@yabinma yabinma commented Feb 7, 2025

Background:
Presto forward is a feature to monitor the workload in source Presto cluster and then clone the workload to target clusters.

It's well working. There is one requirement which to syncronize the query cancel to target clusters. That means when the workload is canceled in source cluster, the target cluster should cancel the workload as well.

Solution:

  1. Maintain a query cache, including the queryId in both of source and target clusters, the nextUri for canceling the query. When a query is triggered in target clusters, the cache is updated. While after the query execution completion, remove the query in the cache.
  2. In next sync, check if there is any query is canceled in source cluster. If it does, and then to match in the cache. If it's found in cache, means it's still running. And then call api to cancel the query.

@yabinma yabinma requested a review from ethanyzhang as a code owner February 7, 2025 19:35
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.

1 participant