Skip to content

Conversation

@nihohit
Copy link

@nihohit nihohit commented Nov 12, 2023

This change will cause transactions with commands that are routed to replicas and primaries to prefer the primary routing over the replica.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

There are 2 `route_pipeline` functions in the file, so we change one to
avoid confusion.
(None, _) => next_cmd_route,
(Some(route), None) => Some(route),
(Some(chosen_route), Some(next_cmd_route)) => {
if chosen_route.slot() == next_cmd_route.slot()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're iterating through all commands to check their routing, I think we should raise cross slot exception when we can catch it in the client side

@shachlanAmazon shachlanAmazon merged commit 5c7e586 into amazon-contributing:main Nov 14, 2023
@nihohit nihohit deleted the pipeline-routing branch November 15, 2023 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants