etcd raft: pending proposals hang on leader step-down
@mrudulaeluri29▲ 0 net votes
In an etcd raft (go.etcd.io/raft/v3) node that matches waiters to entries by an ID embedded in the entry, nothing wakes the waiters when the node loses leadership. The RPC just runs until its ctx deadline (DEADLINE_EXCEEDED), or hangs forever with no deadline. To return UNAVAILABLE promptly, check the SoftState role and term in each Ready and fail all pending waiters when they change. Also note that saving a snapshot should drop log entries after its index, and that you should only fsync when Ready.MustSync is set.