Skip to content

[fix](cloud) Fix double assignment in recycler_service.cpp that cause…#64168

Open
deardeng wants to merge 1 commit into
apache:masterfrom
deardeng:fix-recycler-double-assign
Open

[fix](cloud) Fix double assignment in recycler_service.cpp that cause…#64168
deardeng wants to merge 1 commit into
apache:masterfrom
deardeng:fix-recycler-double-assign

Conversation

@deardeng
Copy link
Copy Markdown
Collaborator

@deardeng deardeng commented Jun 6, 2026

Fix undefined behavior in RecyclerServiceImpl::statistics_recycle where 'to_recycle_bytes' was assigned twice in the same expression:
int64_t to_recycle_bytes = to_recycle_bytes = ...

This triggers -Werror=sequence-point on GCC and breaks cloud build.

Introduced by: #55455

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

…s build failure

Fix undefined behavior in RecyclerServiceImpl::statistics_recycle where
'to_recycle_bytes' was assigned twice in the same expression:
  int64_t to_recycle_bytes = to_recycle_bytes = ...

This triggers -Werror=sequence-point on GCC and breaks cloud build.

Introduced by: apache#55455
@hello-stephen
Copy link
Copy Markdown
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?

@deardeng
Copy link
Copy Markdown
Collaborator Author

deardeng commented Jun 6, 2026

run buildall

@deardeng
Copy link
Copy Markdown
Collaborator Author

deardeng commented Jun 6, 2026

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review result: no blocking issues found for the actual PR diff.

Critical checkpoint conclusions:

  • Goal/test: The PR aims to fix a cloud build failure caused by duplicate self-assignment in RecyclerServiceImpl::statistics_recycle; the one-line change directly removes the undefined/diagnostic-triggering expression. No test was run locally; this is compile-fix-only and should be covered by cloud build CI.
  • Scope: The change is minimal and focused: one assignment expression in cloud/src/recycler/recycler_service.cpp.
  • Concurrency: No new concurrency behavior is introduced. Existing worker-pool logic and metric reads are unchanged.
  • Lifecycle/static initialization: No lifecycle or static/global initialization changes are introduced.
  • Configuration: No configuration item is added or changed.
  • Compatibility/storage/transactions: No protocol, storage format, transaction, or persistence behavior is changed.
  • Parallel code paths: I checked for the same duplicate-assignment pattern under cloud/src; no remaining instance was found.
  • Conditional checks/error handling: No new condition or error path is introduced.
  • Test coverage/results: No test files or generated results are changed. CI compile coverage is the relevant validation for this fix.
  • Observability/performance: No observability or performance behavior changes beyond eliminating the bad assignment expression.
  • Cloud recycler specifics: The recycler mark/delete, abort-before-delete, packed-file, and retry/idempotency flows are not touched by this PR.

User focus: no additional user-provided review focus was present.

@hello-stephen
Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 0.00% (0/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.34% (1906/2433)
Line Coverage 64.77% (33981/52468)
Region Coverage 65.32% (17526/26833)
Branch Coverage 54.00% (9305/17230)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants