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.
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 the query planner options to the query plan cache key #5100
Add the query planner options to the query plan cache key #5100
Changes from all commits
25cb440
5ca59ef
4912f56
abab512
e7b3ad2
10a6ae7
3db24b9
cde9e63
716901a
e9ffe66
605db97
4968a88
1d908d4
fbcb0d8
3c6ef29
ebd15d0
c5375bc
bf0b938
b049a21
4bd73a8
ce20a8b
43ccd9d
17addbc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
why is introspection added here but not in the Hash implementation below?
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.
Nice catch: 43ccd9d
I am wondering though why we are using a manual implementation of
Hash
rather than using derive? There seems to be nothing special about this structure that would warrant a custom impl.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.
I'd have to dig it up, but I think there was something in the key that could not implement
Hash
in the pastThere 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.
Once we figure that out, is there somewhere we could add a comment to make that more intuitive?
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.
If we don't need a custom implementation now let's remove it and use derive. That way we don't have to worry about it in the future. If we do eventually need a custom version would need to comment and possibly fuzz test.
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's unrelated to this particular PR, but it took me a while to understand that
operation
is a hash ofself.operation
, which is actually an operation name.Also,
self.hash
is hash of query and relevent parts of schema, but taking into account only operation matchingoperation_name
.At the same time,
self.hash
doesn't include a hash of "operation_name" itselfThere 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.
Also
self.metadata
is actually "authorization metadata".P.S. Same as the previous comment, this is unrelated to this PR.
Just comments for others to also understand what is happening in this code.
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.
I'd like to see this refactored and keys become self describing.
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.
When/where does this change get itemized/made?
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.
Unrelated to this PR: Why are
operation
andmetadata
separate vs combined in the same hasher?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.
that was a way to see how many variants there can be in cache for a single query