Skip to content

[fix](cloud) Fail closed on unknown MetaService response codes - #66364

Open
wyxxxcat wants to merge 1 commit into
apache:masterfrom
wyxxxcat:fix_old_client_ms_code
Open

[fix](cloud) Fail closed on unknown MetaService response codes#66364
wyxxxcat wants to merge 1 commit into
apache:masterfrom
wyxxxcat:fix_old_client_ms_code

Conversation

@wyxxxcat

@wyxxxcat wyxxxcat commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary: Meta Service responses contain both an exact actual_code and a
legacy-compatible code. When a client recognizes the actual_code, it should use
that exact value. When actual_code is unknown, the legacy code is safe only if
it is explicitly present and non-OK. The previous logic could fall back to an
unset or OK code and incorrectly treat an unknown Meta Service error as success.
This change makes BE and FE fail closed with UNDEFINED_ERR in that case, while
preserving compatible non-OK fallbacks. It also adds a message explaining the
MS_TOO_BUSY to KV_TXN_CONFLICT conversion for legacy clients.

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

@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?

@wyxxxcat
wyxxxcat force-pushed the fix_old_client_ms_code branch 3 times, most recently from 9de76ba to d0aa93c Compare August 3, 2026 03:53
@wyxxxcat
wyxxxcat marked this pull request as ready for review August 3, 2026 03:53
@wyxxxcat
wyxxxcat force-pushed the fix_old_client_ms_code branch from d0aa93c to aeed3c8 Compare August 3, 2026 03:59
@wyxxxcat

wyxxxcat commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

run buildall

Comment thread cloud/src/meta-service/meta_service_helper.h Outdated
@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (12/12) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 59.29% (25709/43361)
Line Coverage 43.34% (258037/595362)
Region Coverage 39.03% (204567/524141)
Branch Coverage 40.37% (93359/231234)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 81.82% (9/11) 🎉
Increment coverage report
Complete coverage report

@wyxxxcat
wyxxxcat force-pushed the fix_old_client_ms_code branch from aeed3c8 to 7037019 Compare August 3, 2026 06:11
@wyxxxcat

wyxxxcat commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

run buildall

@wyxxxcat
wyxxxcat force-pushed the fix_old_client_ms_code branch from 7037019 to f5606b1 Compare August 3, 2026 06:54
@wyxxxcat
wyxxxcat force-pushed the fix_old_client_ms_code branch from f5606b1 to 64dad43 Compare August 3, 2026 07:13
@wyxxxcat

wyxxxcat commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 100.00% (8/8) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.57% (1912/2465)
Line Coverage 64.53% (34220/53027)
Region Coverage 64.44% (17278/26812)
Branch Coverage 53.94% (9251/17150)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 81.82% (9/11) 🎉
Increment coverage report
Complete coverage report

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