mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-06 06:53:12 +00:00
When sharder says that the write should go to multiple shards, we need to consider the write as applied only if it was applied to all those shards. This can happen during intra-node tablet migration. During such migration, the request coordinator on storage_proxy side is coordinating to hosts as if no migration was in progress. The replica-side coordinator coordinates to shards based on sharder response. One way to think about it is that effective_replication_map::get_natural_endpoints()/get_pending_endpoints() tells how to coordinate between nodes, and sharder tells how to coordinate between shards. Both work with some snapshot of tablet metadata, which should be kept alive around the operation. Sharder is associated with its own effective_replication_map, which marks the topology version as used and allows barriers to synchronize with replica-side operations.