From b221be6ded06a560f5fe52649ee7bf2d7bbdb5b9 Mon Sep 17 00:00:00 2001 From: wego1236 <844740374@qq.com> Date: Thu, 14 Nov 2024 16:51:48 +0800 Subject: [PATCH] Fixed a case in progress.go maybe_decr_to that could cause the next value to be less than or equal to the match value in the probe state --- src/tracker/progress.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tracker/progress.rs b/src/tracker/progress.rs index 20fe9225..dc19bb81 100644 --- a/src/tracker/progress.rs +++ b/src/tracker/progress.rs @@ -192,8 +192,8 @@ impl Progress { // Do not decrease next index if it's requesting snapshot. if request_snapshot == INVALID_INDEX { self.next_idx = cmp::min(rejected, match_hint + 1); - if self.next_idx < 1 { - self.next_idx = 1; + if self.next_idx < self.matched + 1 { + self.next_idx = self.matched + 1; } } else if self.pending_request_snapshot == INVALID_INDEX { // Allow requesting snapshot even if it's not Replicate.