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.
Helps (or arguably fixes) #468
For smarter batch constitution (following up on #448), it is required to have access to the token a particular statement would be directed to. However, that is pretty difficult to do without access to calculate_token.
That was initially put in #508, but planned to put in a separate PR to keep it minimal
(#508 (comment))
It seems I had forgotten to open that separate PR, and I end up getting bitten by that now that I want to constitute my batches in a smarter way. ^^'
So here it is.
I'm only putting "helps" above because I think we may want to also expose query planning (
session.plan(prepared_statement, serialized_values) -> impl Iterator<Item = (Arc<Node>, ShardID)>
) as that may make it significantly easier on the user to obtain the relevant keys for batching - but I'd like to keep this PR that just enables the ideal behavior as simple as possible.Pre-review checklist
Fixes:
annotations to PR description.