Merge query cache and query state#156632
Draft
zetanumbers wants to merge 2 commits into
Draft
Conversation
Contributor
Author
|
And there're the benchmark results for 4 threads on my MacBook Pro M1 Pro:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So basically we have query cache and query state separate "hash" tables. Cache tracks completed queries while state tracks unfinished queries. Thus we are required to a double check lookup while updating one of them like in
try_execute_queryand we do multiple hash table lookups while executing a query since cache/state entry might have moved due to rehashing. This PR merges query cache with query state and stores query cache entries in an arena for its stable memory location.However my manually written slop code currently breaks query cycle detection, but I know how to fix it.
More details in #t-compiler/query-system > Merging query cache and query state