This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
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.
Bulk-invalidate e2e cached queries after claiming keys #16613
Bulk-invalidate e2e cached queries after claiming keys #16613
Changes from 11 commits
190b50a
b1ca34f
171d705
c6f2a8f
307c77a
d9b7d08
f6ee91c
9e72bf4
be349f2
91a48af
35938df
69b539e
4899623
e3a6358
b95d361
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.
Should we update the non-bulk versions of these to actually require tuples?
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 was wondering if we should actually be requiring List[str], since the
keys
column is[]text
. It'd save a conversion tuple->list here and there? 🤷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 think tuples are used though because they're immutable so is what is used in the cache keys?
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.
ahh, that makes sense!
I'd be in favour of specifying
Tuple[str, ...]
, but in another PR.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.
Do they have to be strings? I'd be kind of surprised if we don't have other types in there?
Anyway, yes sounds like a different PR.
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.
@DMRobertson postulated if it would be better to do:
But I don't think it matters much since
txn_call_after
just calls them in a loop anyway? Maybe one way would use less memory. 🤷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 wonder if
get_next_txn
should call this instead of duplicating some of the logic? (Same kind of goes for the cache & stream functions above TBH)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 think this is a question for @erikjohnston --
_add_persisted_position
seems fairly heavy and if we could optimize what we call it with (or take multiple IDs at once) I think that'd be a win.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 think we certainly could make make it take multiple IDs? It does expect to be called with every position (though I don't think anything would break, just be less efficient)
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 guess if it has to be called w/ every position maybe it isn't a huge deal...