From e6590021d016efe6aaf91dd57d976a09fc73944e Mon Sep 17 00:00:00 2001 From: wanxinhe Date: Mon, 27 Oct 2025 19:02:58 +0800 Subject: [PATCH 1/2] fix ms core when transaction timed out --- cloud/src/recycler/recycler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cloud/src/recycler/recycler.cpp b/cloud/src/recycler/recycler.cpp index 5f30536078fbbe..0c16c7b0e4e132 100644 --- a/cloud/src/recycler/recycler.cpp +++ b/cloud/src/recycler/recycler.cpp @@ -3948,7 +3948,10 @@ int InstanceRecycler::scan_and_recycle( err = "loop_done error"; ret = -1; } - } while (it->more() && !stopped()); + if (!it->more()) { + break; // scan finished + } + } while (!stopped()); return ret; } From 74837ca709e35d863edd2965fdb0257a74274be9 Mon Sep 17 00:00:00 2001 From: wanxinhe Date: Mon, 27 Oct 2025 19:02:58 +0800 Subject: [PATCH 2/2] fix ms core when transaction timed out #57377 --- cloud/src/recycler/recycler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud/src/recycler/recycler.cpp b/cloud/src/recycler/recycler.cpp index 0c16c7b0e4e132..84ec1071f6c20c 100644 --- a/cloud/src/recycler/recycler.cpp +++ b/cloud/src/recycler/recycler.cpp @@ -3909,7 +3909,7 @@ int InstanceRecycler::scan_and_recycle( }; std::unique_ptr it; - do { + while (!stopped()) { if (get_range_retried > 1000) { err = "txn_get exceeds max retry, may not scan all keys"; ret = -1; @@ -3951,7 +3951,7 @@ int InstanceRecycler::scan_and_recycle( if (!it->more()) { break; // scan finished } - } while (!stopped()); + } return ret; }