bobhan1 opened a new pull request, #69968:
URL: https://github.com/apache/doris/pull/69968
### What problem does this PR solve?
Related PR: #69892
Backport #69892 to `branch-4.1` from commit
`b2164ff1bacd3e467fd29f443ef9c03faa899658`.
Background delete bitmap checks acquire the bitmap read lock before the
tablet header lock, while compaction acquires them in the opposite order. The
checks also run under the tablet map mutex, so a blocked tablet can stall
unrelated tablet initialization, Rowsets scans, synchronization, and compaction
scheduling.
Read the sequence-column flag before bitmap traversal and run checks over
the existing tablet snapshot outside the map mutex. Preserve the active and
stale rowset version checks for sequence and non-sequence tables.
Test context conflicts were adapted to the existing 4.1 fixture. The
production patch-id matches the upstream fix, and all five new upstream test
instances are preserved.
### Validation
- ASAN BE unit tests: **47 passed, 0 failures, 0 errors**, verified in the
GTest XML report.
```bash
./run-be-ut.sh --run
--filter='SequenceModes/CloudTabletDeleteBitmapCheckTest.*:CloudTabletMgrTest.*:CloudTabletDeleteBitmapTest.*:TabletMetaTest.*:CloudCompactionTest.*'
-j100
```
- Changed-line clang-format 16 and `git diff --check
upstream/branch-4.1...HEAD` passed.
### Release note
Fix BE deadlocks and cascading write and metadata stalls when background
delete bitmap checks are enabled.
### Check List (For Author)
- Test
- [x] Unit Test
- Behavior changed:
- [x] Yes. Delete bitmap checks avoid reversed lock ordering and run
outside the tablet map mutex.
- Does this need documentation?
- [x] No. No new setting or syntax.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]