-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Improve QueryId/TaskId handling #26769
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
Conversation
d19344c
to
844a94b
Compare
844a94b
to
5028e59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the cleanup!
Avoids using inline regular expression parsing in favor of explicitly splitting on the character literal '.'. Also cleans up checkArgument lines to avoid varargs array allocations.
Previously, TaskId would split and re-parse each part of the identifier in methods like TaskId#getStageId or TaskId#getQueryId. This made those operations relatively more expensive but also meant that re-parsing and allocating a new QueryId instance occurred inside of each MemoryPool reservation operation- increasing the amount of time spent holding the memory pool lock.
5028e59
to
bd8e5ba
Compare
@wendigo Could you update "Release notes" section? |
<ignore>true</ignore> | ||
<code>java.method.visibilityReduced</code> | ||
<old>method java.lang.String io.trino.spi.QueryId::validateId(java.lang.String)</old> | ||
<new>method java.lang.String io.trino.spi.QueryId::validateId(java.lang.String, java.lang.String)</new> | ||
<oldVisibility>public</oldVisibility> | ||
<newVisibility>package</newVisibility> | ||
<justification>Hidden method that is not used outside of QueryId</justification> | ||
</item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is utility method used internally and while being a part of the SPI it is only used in trino-main so I don't think that it warrants a release note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The internal usage is unrelated in my opinion.
Description
Additional context and related issues
Release notes
(X) This is not user-visible or is 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: