From 885aae77b9d8958ba8c5e7d18b0730f5a283a2c2 Mon Sep 17 00:00:00 2001 From: glorv Date: Wed, 3 Apr 2024 15:30:16 +0800 Subject: [PATCH] Update pkg/unsaferecovery/unsafe_recovery_controller.go Co-authored-by: Connor Signed-off-by: glorv --- pkg/unsaferecovery/unsafe_recovery_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/unsaferecovery/unsafe_recovery_controller.go b/pkg/unsaferecovery/unsafe_recovery_controller.go index b3260eb925b..044dbd182e2 100644 --- a/pkg/unsaferecovery/unsafe_recovery_controller.go +++ b/pkg/unsaferecovery/unsafe_recovery_controller.go @@ -781,7 +781,7 @@ func (r *regionItem) IsRaftStale(origin *regionItem, u *Controller) bool { func(a, b *regionItem) int { return int(a.report.GetRaftState().GetHardState().GetTerm()) - int(b.report.GetRaftState().GetHardState().GetTerm()) }, - // choose the peer has maximum applied_index or last index. + // choose the peer has maximum applied index or last index. func(a, b *regionItem) int { maxIdxA := typeutil.MaxUint64(a.report.GetRaftState().GetLastIndex(), a.report.AppliedIndex) maxIdxB := typeutil.MaxUint64(b.report.GetRaftState().GetLastIndex(), b.report.AppliedIndex)