When provisioning a new Shard or CDC replica due to failure we need to get database to new enough state such that it can catch up from LogsDB which only stores last 12-24h of changes.
Currently this is done through external scripts which copy database files of another replica.
Since in Registry we support TCP we could use same code to support it in Shards/CDC as well.
On startup if a non initialized db is detected a separate Sync component would be started.
It would connect to any valid replica, ask it to take a temporary snapshot of RocksDB and stream-iterate over all colulm families.
Once the process is done the Sync component would be destroyed and regular startup continued.
When provisioning a new Shard or CDC replica due to failure we need to get database to new enough state such that it can catch up from LogsDB which only stores last 12-24h of changes.
Currently this is done through external scripts which copy database files of another replica.
Since in Registry we support TCP we could use same code to support it in Shards/CDC as well.
On startup if a non initialized db is detected a separate Sync component would be started.
It would connect to any valid replica, ask it to take a temporary snapshot of RocksDB and stream-iterate over all colulm families.
Once the process is done the Sync component would be destroyed and regular startup continued.