youzan / ZanRedisDB

Yet another distributed fault-tolerant key-value database Compatible with Redis written in Golang.
MIT License
388 stars 60 forks source link

Some issues on the leader transfer #91

Closed absolute8511 closed 3 years ago

absolute8511 commented 3 years ago

Currently, most raft libraries only check the commit index while doing the leader transfer. Some other cases should also be considered to avoid stale/slow read after transfer such as the snapshot status, the applied index, and the pending configure change.

related fix: https://github.com/tikv/tikv/pull/6539 https://github.com/tikv/tikv/pull/8051 https://github.com/tikv/tikv/pull/3878 https://github.com/cockroachdb/cockroach/pull/63507 https://github.com/etcd-io/etcd/pull/12163 https://github.com/etcd-io/etcd/pull/12134 https://github.com/etcd-io/etcd/pull/10822