Backport: For partial MoveTables, setup reverse shard routing rules on workflow creation #11447
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.
Description
For normal
MoveTables
operations — where you're moving tables from one keyspace to another, i.e. the move is at the keyspace level — global routing rules are put in place when the workflow is created so that any attempted access of those tables on the target keyspace are routed to the source keyspace. (In this scenario shard targeting is how you would explicitly get around this routing.)For partial
MoveTables
operations, you're moving the tables from one keyspace to another one shard at a time — so the move is per shard rather than per keyspace. In this scenario you want all traffic to go to one side or the other for a given shard, including shard targeted queries. This then offers the same kind of "global" (scoped to a shard) routing at the shard level that you would expect when doing keyspace levelMoveTables
. This PR implements that functionality.Related Issue(s)
Checklist