From 08a9d1da0716758619bb4eb512244d10c0b1057b Mon Sep 17 00:00:00 2001 From: Abirdcfly Date: Sat, 27 Aug 2022 13:39:48 +0800 Subject: [PATCH] chore: remove duplicate word in comments Signed-off-by: Abirdcfly --- raft/log_test.go | 2 +- raft/raft.go | 2 +- server/storage/mvcc/kv_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/raft/log_test.go b/raft/log_test.go index 0ad23f93b..fe527b37f 100644 --- a/raft/log_test.go +++ b/raft/log_test.go @@ -216,7 +216,7 @@ func TestLogMaybeAppend(t *testing.T) { lastterm, lastindex, lastindex + 2, []pb.Entry{{Index: lastindex + 1, Term: 4}, {Index: lastindex + 2, Term: 4}}, lastindex + 2, true, lastindex + 2, false, }, - // match with the the entry in the middle + // match with the entry in the middle { lastterm - 1, lastindex - 1, lastindex, []pb.Entry{{Index: lastindex, Term: 4}}, lastindex, true, lastindex, false, diff --git a/raft/raft.go b/raft/raft.go index 14b5b76dd..6375abd2e 100644 --- a/raft/raft.go +++ b/raft/raft.go @@ -1691,7 +1691,7 @@ func (r *raft) switchToConfig(cfg tracker.Config, prs tracker.ProgressMap) pb.Co r.maybeSendAppend(id, false /* sendIfEmpty */) }) } - // If the the leadTransferee was removed or demoted, abort the leadership transfer. + // If the leadTransferee was removed or demoted, abort the leadership transfer. if _, tOK := r.prs.Config.Voters.IDs()[r.leadTransferee]; !tOK && r.leadTransferee != 0 { r.abortLeaderTransfer() } diff --git a/server/storage/mvcc/kv_test.go b/server/storage/mvcc/kv_test.go index 6e14de82c..103e153d9 100644 --- a/server/storage/mvcc/kv_test.go +++ b/server/storage/mvcc/kv_test.go @@ -685,7 +685,7 @@ func TestKVRestore(t *testing.T) { keysBefore := readGaugeInt(keysGauge) s.Close() - // ns should recover the the previous state from backend. + // ns should recover the previous state from backend. ns := NewStore(zaptest.NewLogger(t), b, &lease.FakeLessor{}, StoreConfig{}) if keysRestore := readGaugeInt(keysGauge); keysBefore != keysRestore {