Skip to content

Reduce query lock contention #18023

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

Merged
merged 2 commits into from
Jun 28, 2023

Conversation

pettyjamesm
Copy link
Member

@pettyjamesm pettyjamesm commented Jun 22, 2023

Description

Reduces sources of lock contention associated with Query#waitForResults and it's usage by ExecutingStatementResource, largely by passing the additional protocol header fields along with the QueryResults payload in a single record class.

Release notes

(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

@cla-bot cla-bot bot added the cla-signed label Jun 22, 2023
@pettyjamesm pettyjamesm marked this pull request as ready for review June 22, 2023 21:44
@pettyjamesm pettyjamesm requested a review from dain June 22, 2023 22:23
Returns a consolidated QueryResultsResponse instead of just QueryResults
from Query#waitForResults so that the HTTP response threads don't need
to needlessly resynchronize on the Query instance to determine which
ProtocolHeaders should be set on the response.
Avoids registering wrapping timeout callbacks and potential lock
contentionn in Query#waitForResults by checking
ListenableFuture#isDone() before adding the timeout and reduces the
extent of the synchronized section to avoid potentially contending with the
callback thread.
@pettyjamesm pettyjamesm force-pushed the reduce-query-lock-contention branch from 2aa6f9b to 54f950d Compare June 23, 2023 16:55
@pettyjamesm pettyjamesm merged commit 115f82f into trinodb:master Jun 28, 2023
@pettyjamesm pettyjamesm deleted the reduce-query-lock-contention branch June 28, 2023 15:49
@github-actions github-actions bot added this to the 421 milestone Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants