From cacac45c7f8d7cbb79dbe77102e898f68014237c Mon Sep 17 00:00:00 2001 From: Nathan VanBenschoten Date: Wed, 6 Apr 2022 13:46:09 -0400 Subject: [PATCH] kv: remove raft leader progress override in newTruncateDecision Addresses a long-standing TODO. We picked up https://github.com/etcd-io/etcd/pull/10279 a while ago. --- pkg/kv/kvserver/raft_log_queue.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/kv/kvserver/raft_log_queue.go b/pkg/kv/kvserver/raft_log_queue.go index 408009389d78..07298c4b79a9 100644 --- a/pkg/kv/kvserver/raft_log_queue.go +++ b/pkg/kv/kvserver/raft_log_queue.go @@ -309,13 +309,6 @@ func newTruncateDecision(ctx context.Context, r *Replica) (truncateDecision, err log.Eventf(ctx, "raft status after lastUpdateTimes check: %+v", raftStatus.Progress) r.mu.RUnlock() - if pr, ok := raftStatus.Progress[raftStatus.Lead]; ok { - // TODO(tschottdorf): remove this line once we have picked up - // https://github.com/etcd-io/etcd/pull/10279 - pr.State = tracker.StateReplicate - raftStatus.Progress[raftStatus.Lead] = pr - } - input := truncateDecisionInput{ RaftStatus: *raftStatus, LogSize: raftLogSize,