How does cockroachDB repair a slow raft replica

Noticed that etcd-raft will trigger a raft snapshot to be streamed to a slow replica if the leader found a missing log entry for the target replica. However, it seems CockroachDB does not use etcd-raft’s snapshot and only have a placeholder to fake the snapshot implementation. I see you have your own gprc endpoint for snapshot streaming, but my question is how do you guarantee that the fake snapshot will never be triggered? Or if it’s triggered how does the receiving end handle the fake snapshot?

The placeholder you linked to is called, but then we intercept the MsgSnap message in Replica.sendRaftMessage to place the replica on the snapshot queue instead.

1 Like