This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new a5c0a69eaea branch-3.1: [Fix](recycler) Fix possible null pointer when
first txn->get() failed #59019 (#59020)
a5c0a69eaea is described below
commit a5c0a69eaea3fdb0bc6590b1c19cc7e5bec22c26
Author: Gavin Chou <[email protected]>
AuthorDate: Mon Dec 15 11:21:39 2025 +0800
branch-3.1: [Fix](recycler) Fix possible null pointer when first txn->get()
failed #59019 (#59020)
fix first txn->get ends up with null pointer
partial pick #59019
---
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 7527b3b3b08..4a7b7b49913 100644
--- a/cloud/src/recycler/recycler.cpp
+++ b/cloud/src/recycler/recycler.cpp
@@ -2967,7 +2967,7 @@ int InstanceRecycler::scan_and_recycle(
};
std::unique_ptr<RangeGetIterator> it;
- do {
+ while (it == nullptr /* may be not init */ || (it->more() && !stopped())) {
if (get_range_retried > 1000) {
err = "txn_get exceeds max retry, may not scan all keys";
ret = -1;
@@ -3006,7 +3006,7 @@ int InstanceRecycler::scan_and_recycle(
err = "loop_done error";
ret = -1;
}
- } while (it->more() && !stopped());
+ }
return ret;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]