Skip to content

Conversation

@Hastyshell
Copy link
Collaborator

@Hastyshell Hastyshell commented Jun 27, 2025

What problem does this PR solve?

Problem Summary:

Make stale rowsets accessible across BEs to avoid E-230 (versions already merged) in Read-Write Splitting senario.

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

@Hastyshell Hastyshell requested a review from dataroaring as a code owner June 27, 2025 09:08
@Thearas
Copy link
Contributor

Thearas commented Jun 27, 2025

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?

@Hastyshell
Copy link
Collaborator Author

run buildall

@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 83.22% (1106/1329)
Line Coverage 66.74% (18799/28166)
Region Coverage 66.69% (9284/13922)
Branch Coverage 56.45% (5041/8930)

@Hastyshell
Copy link
Collaborator Author

run buildall

@Hastyshell
Copy link
Collaborator Author

run buildall

@Hastyshell Hastyshell changed the title [opt](rowset) Remote fetch rowsets to avoid -230 error when capturing rowsets (#3967) [opt](rowset) Remote fetch rowsets to avoid -230 error when capturing rowsets Jun 27, 2025
@Hastyshell
Copy link
Collaborator Author

run buildall

@Hastyshell
Copy link
Collaborator Author

run buildall

@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 82.63% (1118/1353)
Line Coverage 66.51% (19485/29296)
Region Coverage 65.61% (9325/14212)
Branch Coverage 55.58% (5073/9128)

@Hastyshell
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 82.63% (1118/1353)
Line Coverage 66.48% (19475/29296)
Region Coverage 65.59% (9322/14212)
Branch Coverage 55.49% (5065/9128)

@Hastyshell
Copy link
Collaborator Author

run buildall

@Hastyshell
Copy link
Collaborator Author

run buildall

@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 82.63% (1118/1353)
Line Coverage 66.47% (19472/29296)
Region Coverage 65.52% (9311/14212)
Branch Coverage 55.48% (5064/9128)

@Hastyshell
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 82.63% (1118/1353)
Line Coverage 66.46% (19470/29296)
Region Coverage 65.58% (9320/14212)
Branch Coverage 55.50% (5066/9128)

gavinchou
gavinchou previously approved these changes Jul 1, 2025
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jul 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2025

PR approved by anyone and no changes requested.

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 82.67% (1121/1356)
Line Coverage 66.45% (19491/29332)
Region Coverage 65.88% (9609/14585)
Branch Coverage 55.43% (5062/9132)

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 16.75% (99/591) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 41.21% (10946/26562)
Line Coverage 31.99% (93752/293102)
Region Coverage 31.10% (48340/155448)
Branch Coverage 27.54% (24755/89874)

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jul 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2025

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

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring dataroaring merged commit 0e477b6 into apache:branch-3.0 Jul 7, 2025
24 of 27 checks passed
dataroaring pushed a commit that referenced this pull request Jul 9, 2025
…52582)

### What problem does this PR solve?

Currently, `DeleteBitmap`'s wrong move assignment operator can cause
correctness problem on mow table if SC's alter process produce delete
bitmaps when calculating delete bitmaps for incremental rowsets after
the modification in `CloudSchemaChangeJob::_process_delete_bitmap` of
#52440 because `origin_dbm` and
`delete_bitmap` refer to the same `DeleteBitmap` object.

![image](https://github.com/user-attachments/assets/254d975a-594a-4b47-b028-64e47a05cb72)
github-actions bot pushed a commit that referenced this pull request Jul 9, 2025
…52582)

### What problem does this PR solve?

Currently, `DeleteBitmap`'s wrong move assignment operator can cause
correctness problem on mow table if SC's alter process produce delete
bitmaps when calculating delete bitmaps for incremental rowsets after
the modification in `CloudSchemaChangeJob::_process_delete_bitmap` of
#52440 because `origin_dbm` and
`delete_bitmap` refer to the same `DeleteBitmap` object.

![image](https://github.com/user-attachments/assets/254d975a-594a-4b47-b028-64e47a05cb72)
github-actions bot pushed a commit that referenced this pull request Jul 9, 2025
…52582)

### What problem does this PR solve?

Currently, `DeleteBitmap`'s wrong move assignment operator can cause
correctness problem on mow table if SC's alter process produce delete
bitmaps when calculating delete bitmaps for incremental rowsets after
the modification in `CloudSchemaChangeJob::_process_delete_bitmap` of
#52440 because `origin_dbm` and
`delete_bitmap` refer to the same `DeleteBitmap` object.

![image](https://github.com/user-attachments/assets/254d975a-594a-4b47-b028-64e47a05cb72)
@Hastyshell Hastyshell changed the title [opt](rowset) Remote fetch rowsets to avoid -230 error when capturing rowsets [opt](rowset) Remote fetch rowsets to avoid -230 error when capturing rowsets (#52995) Jul 9, 2025
@deardeng deardeng mentioned this pull request Aug 1, 2025
16 tasks
dataroaring pushed a commit that referenced this pull request Aug 3, 2025
### What problem does this PR solve?

Fix 
1. cloud_decommission increased it robustness
2. test_cloud_full_compaction_multi_segments,
test_cloud_mow_retry_txn_interleave, test_cloud_concurrent_calc_dbm_task
fix its not set fe debug point
3. fix CloudTablet.capture_rs_readers.return.e-230 debug point not work,
due to #52440,
deardeng added a commit to deardeng/incubator-doris that referenced this pull request Aug 4, 2025
Fix
1. cloud_decommission increased it robustness
2. test_cloud_full_compaction_multi_segments,
test_cloud_mow_retry_txn_interleave, test_cloud_concurrent_calc_dbm_task
fix its not set fe debug point
3. fix CloudTablet.capture_rs_readers.return.e-230 debug point not work,
due to apache#52440,
deardeng added a commit to deardeng/incubator-doris that referenced this pull request Aug 4, 2025
Fix
1. cloud_decommission increased it robustness
2. test_cloud_full_compaction_multi_segments,
test_cloud_mow_retry_txn_interleave, test_cloud_concurrent_calc_dbm_task
fix its not set fe debug point
3. fix CloudTablet.capture_rs_readers.return.e-230 debug point not work,
due to apache#52440,
dataroaring pushed a commit that referenced this pull request Aug 4, 2025
…kends except for warmup jobs (#54131)

### What problem does this PR solve?

Problem Summary:

Fix logic conflict of #52514 and
#52440

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] 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 <!-- Add your reason?  -->

- Behavior changed:
    - [ ] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
dataroaring pushed a commit to dataroaring/incubator-doris that referenced this pull request Aug 13, 2025
It is intruduced by apache#40716 while
it is dismissed by apache#52440.
gavinchou pushed a commit that referenced this pull request Aug 14, 2025
It is intruduced by #40716 while it
is dismissed by #52440.
dataroaring added a commit to dataroaring/incubator-doris that referenced this pull request Aug 14, 2025
BiteTheDDDDt pushed a commit to BiteTheDDDDt/incubator-doris that referenced this pull request Sep 1, 2025
Fix
1. cloud_decommission increased it robustness
2. test_cloud_full_compaction_multi_segments,
test_cloud_mow_retry_txn_interleave, test_cloud_concurrent_calc_dbm_task
fix its not set fe debug point
3. fix CloudTablet.capture_rs_readers.return.e-230 debug point not work,
due to apache#52440,

pick from apache#54227
gavinchou pushed a commit that referenced this pull request Oct 23, 2025
… rowsets (#52995)

Related PR: #52440 

In read-write splitting scenarios, some BE (Backend) nodes may have
already merged certain rowset versions, while another BE still attempts
to capture or access those rowsets.
When this happens, the BE reports error E-230 (versions already merged),
causing data access or synchronization to fail.

This PR introduces a remote rowset fetching mechanism, allowing a BE
that lacks the required rowset to fetch it from other BE nodes, instead
of failing with E-230.

- Added a remote fetch mechanism in the rowset management layer:
When a BE detects that a rowset is missing locally but has already been
merged, it will try to fetch the rowset from other BE nodes.
- Updated version and state checking logic to correctly identify the
“merged but missing” condition.
- Adjusted the rowset access path to trigger remote fetch rather than
throwing an immediate error.
- Added tests (unit/integration) to cover the new logic where
applicable.
- Ensured backward compatibility: If the BE already has the rowset
locally or read-write splitting is not enabled, the behavior remains
unchanged.

### Release note

Introduce a remote rowset fetching mechanism to prevent E-230 (“versions
already merged”) errors in read-write splitting scenarios.
This improves BE fault tolerance when some nodes have merged versions
that others have not yet synchronized.
Hastyshell added a commit to Hastyshell/doris that referenced this pull request Oct 23, 2025
… rowsets (apache#52995)

Related PR: apache#52440

In read-write splitting scenarios, some BE (Backend) nodes may have
already merged certain rowset versions, while another BE still attempts
to capture or access those rowsets.
When this happens, the BE reports error E-230 (versions already merged),
causing data access or synchronization to fail.

This PR introduces a remote rowset fetching mechanism, allowing a BE
that lacks the required rowset to fetch it from other BE nodes, instead
of failing with E-230.

- Added a remote fetch mechanism in the rowset management layer:
When a BE detects that a rowset is missing locally but has already been
merged, it will try to fetch the rowset from other BE nodes.
- Updated version and state checking logic to correctly identify the
“merged but missing” condition.
- Adjusted the rowset access path to trigger remote fetch rather than
throwing an immediate error.
- Added tests (unit/integration) to cover the new logic where
applicable.
- Ensured backward compatibility: If the BE already has the rowset
locally or read-write splitting is not enabled, the behavior remains
unchanged.

Introduce a remote rowset fetching mechanism to prevent E-230 (“versions
already merged”) errors in read-write splitting scenarios.
This improves BE fault tolerance when some nodes have merged versions
that others have not yet synchronized.
dwdwqfwe pushed a commit to dwdwqfwe/doris that referenced this pull request Oct 24, 2025
… rowsets (apache#52995)

Related PR: apache#52440 

In read-write splitting scenarios, some BE (Backend) nodes may have
already merged certain rowset versions, while another BE still attempts
to capture or access those rowsets.
When this happens, the BE reports error E-230 (versions already merged),
causing data access or synchronization to fail.

This PR introduces a remote rowset fetching mechanism, allowing a BE
that lacks the required rowset to fetch it from other BE nodes, instead
of failing with E-230.

- Added a remote fetch mechanism in the rowset management layer:
When a BE detects that a rowset is missing locally but has already been
merged, it will try to fetch the rowset from other BE nodes.
- Updated version and state checking logic to correctly identify the
“merged but missing” condition.
- Adjusted the rowset access path to trigger remote fetch rather than
throwing an immediate error.
- Added tests (unit/integration) to cover the new logic where
applicable.
- Ensured backward compatibility: If the BE already has the rowset
locally or read-write splitting is not enabled, the behavior remains
unchanged.

### Release note

Introduce a remote rowset fetching mechanism to prevent E-230 (“versions
already merged”) errors in read-write splitting scenarios.
This improves BE fault tolerance when some nodes have merged versions
that others have not yet synchronized.
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. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants