raft: postpone MsgReadIndex until first commit in the term

Fixes #12680
This commit is contained in:
wpedrak
2021-03-11 15:39:41 +01:00
parent 456e129422
commit 758ff0163c
3 changed files with 62 additions and 18 deletions

View File

@@ -183,6 +183,8 @@ type Node interface {
// Read state has a read index. Once the application advances further than the read
// index, any linearizable read requests issued before the read request can be
// processed safely. The read state will have the same rctx attached.
// Note that request can be lost without notice, therefore it is user's job
// to ensure read index retries.
ReadIndex(ctx context.Context, rctx []byte) error
// Status returns the current status of the raft state machine.