0AyanamiRei opened a new pull request, #64560:
URL: https://github.com/apache/doris/pull/64560
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
For merge-on-write unique-key load, delete bitmap generation can run
asynchronously after segment writers have been closed. If segment compaction is
triggered in the same load and compacts away the original segment files before
delete bitmap generation builds the temporary rowset, the delete bitmap path
may try to reopen a removed segment and fail with `NOT_FOUND`.
After this failure, the BE reports the tablet write error, marks the
tablet/node channel as failed, cancels the node channel, reports the error back
to the coordinator, and the stream load fails. In the reproduced failure, the
stream load returned `Status: Fail` with `failed to get file size ... _1.dat:
No such file or directory`.
This PR adds two BE debug points to control the race window:
- pause delete bitmap generation before loading temporary rowset segments;
- pause before segment compaction after a target segment is added.
It also adds a fault-injection regression case that deterministically
reproduces the race by forcing frequent memtable flushes, enabling segment
compaction with batch size 2, and loading duplicated keys into a MOW unique-key
table.
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [x] Regression test
- `./run-regression-test.sh --run -d fault_injection_p0 -s
test_mow_load_delete_bitmap_segcompaction_race`
- [ ] Unit Test
- [x] Manual test (add detailed scripts or steps below)
- `BUILD_TYPE=Debug ./build.sh --be`
- Verified the reproduced failure in
`output/regression-test/log/doris-regression-test.20260616.152950.log`: stream
load failed with `NOT_FOUND failed to get file size ... _1.dat`, and the suite
passed as the expected reproduction.
- [ ] 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:
- [x] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/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 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]