Skip to content

Commit

Permalink
Update pkg/unsaferecovery/unsafe_recovery_controller.go
Browse files Browse the repository at this point in the history
Co-authored-by: Connor <[email protected]>
Signed-off-by: glorv <[email protected]>
  • Loading branch information
glorv and Connor1996 committed Apr 3, 2024
1 parent 6eb1499 commit 885aae7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/unsaferecovery/unsafe_recovery_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 885aae7

Please sign in to comment.