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 QueuedStatementResource timeout for query submission #62

Open
wants to merge 2 commits into
base: hotfix-350
Choose a base branch
from

Conversation

takezoe
Copy link
Member

@takezoe takezoe commented Nov 23, 2022

No description provided.

electrum and others added 2 commits November 23, 2022 10:58
This makes the code easier to read, but does not change behavior.

# Conflicts:
#	presto-main/src/main/java/io/prestosql/dispatcher/QueuedStatementResource.java
QueuedStatementResource attempts to maintain an in-memory query cache by
only expiring queries that are no longer tracked by DispatchManager. It
is possible for a query to be created in QueuedStatementResource, but
never submitted to DispatchManager if the client never comes back and
calls getStatus() (which is the trigger for the query to be submitted to
DispatchManager).

To handle this, we add a timeout to purge queries from this cache if it
has not been submitted by the query abandoned client timeout threshold.

# Conflicts:
#	presto-main/src/main/java/io/prestosql/dispatcher/QueuedStatementResource.java
@miniway miniway self-requested a review November 24, 2022 13:34
Copy link
Member

@miniway miniway left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants