Skip to content

[fix](cloud) Hide KV_TXN_MAYBE_COMMITTED from clients#62244

Merged
luwei16 merged 3 commits intoapache:masterfrom
luwei16:fix/meta-service-downgrade-kv-txn-maybe-committed
Apr 20, 2026
Merged

[fix](cloud) Hide KV_TXN_MAYBE_COMMITTED from clients#62244
luwei16 merged 3 commits intoapache:masterfrom
luwei16:fix/meta-service-downgrade-kv-txn-maybe-committed

Conversation

@luwei16
Copy link
Copy Markdown
Contributor

@luwei16 luwei16 commented Apr 8, 2026

What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Preserve MetaService retry handling for KV_TXN_MAYBE_COMMITTED internally, but downgrade the final response code to KV_TXN_COMMIT_ERR so older BE/FE clients do not treat the proto2 unknown enum as OK.

Release note

None

Check List (For Author)

  • Test: Cloud unit test

    • ./run-cloud-ut.sh --run --filter='meta_service_test:MetaServiceTxnStoreRetryableTest.*' -j 8
  • Behavior changed: Yes (MetaService no longer exposes KV_TXN_MAYBE_COMMITTED to clients; it still retries internally and returns KV_TXN_COMMIT_ERR externally)

  • Does this need documentation: No

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Preserve MetaService retry handling for KV_TXN_MAYBE_COMMITTED internally, but downgrade the final response code to KV_TXN_COMMIT_ERR so older BE/FE clients do not treat the proto2 unknown enum as OK.

### Release note

None

### Check List (For Author)

- Test: Cloud unit test

    - ./run-cloud-ut.sh --run --filter='meta_service_test:MetaServiceTxnStoreRetryableTest.*' -j 8

- Behavior changed: Yes (MetaService no longer exposes KV_TXN_MAYBE_COMMITTED to clients; it still retries internally and returns KV_TXN_COMMIT_ERR externally)

- Does this need documentation: No
@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?

@luwei16
Copy link
Copy Markdown
Contributor Author

luwei16 commented Apr 8, 2026

run buildall

@luwei16
Copy link
Copy Markdown
Contributor Author

luwei16 commented Apr 8, 2026

run buildall

w41ter
w41ter previously approved these changes Apr 8, 2026
@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Apr 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

PR approved by anyone and no changes requested.

@hello-stephen
Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 83.33% (5/6) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.52% (1799/2291)
Line Coverage 64.30% (32343/50301)
Region Coverage 65.13% (16286/25005)
Branch Coverage 55.63% (8704/15646)

gavinchou
gavinchou previously approved these changes Apr 8, 2026
@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 59.38% (19/32) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.63% (27364/37165)
Line Coverage 57.28% (295358/515662)
Region Coverage 54.56% (246206/451241)
Branch Coverage 56.17% (106626/189833)

### What problem does this PR solve?

Issue Number: None

Related PR: apache#62244

Problem Summary: Add cloud unit tests that cover the MetaServiceProxy downgrade paths for KV_TXN_MAYBE_COMMITTED so the PR's retry-handling change is exercised on both read and commit RPCs.

### Release note

None

### Check List (For Author)

- Test: Cloud unit test
    - ./run-cloud-ut.sh --run --filter='meta_service_test:MetaServiceTxnStoreRetryableTest.*' -j8
- Behavior changed: No
- Does this need documentation: No
@luwei16 luwei16 dismissed stale reviews from gavinchou and w41ter via 58c0555 April 10, 2026 07:31
@github-actions github-actions Bot removed the approved Indicates a PR has been approved by one committer. label Apr 10, 2026
@luwei16
Copy link
Copy Markdown
Contributor Author

luwei16 commented Apr 10, 2026

run buildall

1 similar comment
@luwei16
Copy link
Copy Markdown
Contributor Author

luwei16 commented Apr 10, 2026

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

@luwei16
Copy link
Copy Markdown
Contributor Author

luwei16 commented Apr 14, 2026

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.03% (20135/37969)
Line Coverage 36.58% (189353/517680)
Region Coverage 32.82% (146957/447716)
Branch Coverage 33.98% (64357/189421)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.64% (27380/37183)
Line Coverage 57.31% (295789/516096)
Region Coverage 54.48% (246156/451848)
Branch Coverage 56.20% (106777/190003)

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/63) 🎉
Increment coverage report
Complete coverage report

@luwei16
Copy link
Copy Markdown
Contributor Author

luwei16 commented Apr 14, 2026

run nonConcurrent

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.63% (27378/37183)
Line Coverage 57.30% (295743/516096)
Region Coverage 54.46% (246057/451848)
Branch Coverage 56.19% (106756/190003)

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/63) 🎉
Increment coverage report
Complete coverage report

Copy link
Copy Markdown
Collaborator

@Hastyshell Hastyshell left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Apr 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

@luwei16 luwei16 removed the dev/3.1.x label Apr 20, 2026
@luwei16 luwei16 merged commit 48bad76 into apache:master Apr 20, 2026
30 of 31 checks passed
github-actions Bot pushed a commit that referenced this pull request Apr 20, 2026
Problem Summary: Preserve MetaService retry handling for
KV_TXN_MAYBE_COMMITTED internally, but downgrade the final response code
to KV_TXN_COMMIT_ERR so older BE/FE clients do not treat the proto2
unknown enum as OK.

### Release note

None

### Check List (For Author)

- Test: Cloud unit test

- ./run-cloud-ut.sh --run
--filter='meta_service_test:MetaServiceTxnStoreRetryableTest.*' -j 8

- Behavior changed: Yes (MetaService no longer exposes
KV_TXN_MAYBE_COMMITTED to clients; it still retries internally and
returns KV_TXN_COMMIT_ERR externally)
github-actions Bot pushed a commit that referenced this pull request Apr 20, 2026
Problem Summary: Preserve MetaService retry handling for
KV_TXN_MAYBE_COMMITTED internally, but downgrade the final response code
to KV_TXN_COMMIT_ERR so older BE/FE clients do not treat the proto2
unknown enum as OK.

### Release note

None

### Check List (For Author)

- Test: Cloud unit test

- ./run-cloud-ut.sh --run
--filter='meta_service_test:MetaServiceTxnStoreRetryableTest.*' -j 8

- Behavior changed: Yes (MetaService no longer exposes
KV_TXN_MAYBE_COMMITTED to clients; it still retries internally and
returns KV_TXN_COMMIT_ERR externally)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.0.x dev/4.1.x reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants