Skip to content

[chore](cloud) Change range iterator check pattern from do...while() to while() to get better robustness#59019

Draft
gavinchou wants to merge 4 commits intoapache:masterfrom
gavinchou:gavin-fix-cloud-while-more
Draft

[chore](cloud) Change range iterator check pattern from do...while() to while() to get better robustness#59019
gavinchou wants to merge 4 commits intoapache:masterfrom
gavinchou:gavin-fix-cloud-while-more

Conversation

@gavinchou
Copy link
Contributor

@gavinchou gavinchou commented Dec 14, 2025

The original implementation of do...while() check is not extensible for retry if we failed to do the first txn->get() in the while loop. It will end with referencing null pointer at the check while (it->more()), and the original pattern is easily misused/copied in a scenario needs retry.

No need to add new tests, the changes are covered by existing tests.

…o while() to get better robustness

The original implementation of do...while() check is not extensible for
retry if we failed to do the first `txn->get()` in the while loop.
It will end with referencing null pointer at the check `while (it->more())`
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@gavinchou gavinchou changed the title [chore](cloud) Change range iterator check pattern from do..while() to while() to get better robustness [chore](cloud) Change range iterator check pattern from do...while() to while() to get better robustness Dec 14, 2025
@gavinchou
Copy link
Contributor Author

run buildall

@gavinchou
Copy link
Contributor Author

run cloud_ut

morrySnow pushed a commit that referenced this pull request Dec 15, 2025
…>get() failed #59019 (#59020)

fix first txn->get ends up with null pointer
partial pick #59019
w41ter
w41ter previously approved these changes Dec 15, 2025
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Dec 15, 2025
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Dec 18, 2025
@gavinchou
Copy link
Contributor Author

run buildall

@gavinchou gavinchou marked this pull request as draft December 25, 2025 12:43
w41ter pushed a commit to w41ter/incubator-doris that referenced this pull request Dec 26, 2025
seawinde pushed a commit to seawinde/doris that referenced this pull request Jan 30, 2026
…>get() failed apache#59019 (apache#59020)

fix first txn->get ends up with null pointer
partial pick apache#59019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants