Closed luluz66 closed 3 months ago
I don't think you can remove all replicas of a shard, as a shard with 0 replica is not considered as valid in dragonboat.
To remove a shard completely, including all associated data of the shard, you can just stop all replicas and use the RemoveData() method on all involved machines to delete all associated data. Note that you are not suppose to restart those replicas once their data is removed.
In dragonboat, I can use
nodehost.SyncRequestDeleteReplica
to delete a replica of a specific shard. But it doesn't let me to delete the last replica of the shard. (code)How can I delete a shard completely, in particular, remove all replicas of this shard?