bobhan1 opened a new pull request, #69892:
URL: https://github.com/apache/doris/pull/69892

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Problem Summary:
   
   With background delete bitmap checks enabled, the checker holds the delete 
bitmap read lock while `tablet_schema()` acquires the tablet header lock. 
Compaction takes these locks in the opposite order, causing a deadlock on the 
same tablet. The checker also runs inside `TabletMap::traverse()`, so its outer 
map mutex blocks unrelated tablet initialization, Rowsets scans, 
synchronization, and compaction scheduling.
   
   Read the sequence-column flag before traversing the delete bitmap, and run 
checks outside the map mutex by reusing the existing tablet snapshot. Preserve 
the active/stale rowset version checks for sequence and non-sequence tables.
   
   ### Release note
   
   Fix BE deadlocks and cascading write and metadata stalls when background 
delete bitmap checks are enabled.
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test
       - [ ] Manual test
       - [ ] No need to test
   - Behavior changed:
       - [ ] No.
       - [x] Yes. Delete bitmap checks avoid the reversed lock order and no 
longer hold the tablet map mutex while checking individual tablets.
   - Does this need documentation?
       - [x] No.
       - [ ] Yes.
   
   Validation: 72 ASAN unit tests passed, including five new instances covering 
lock ordering, an empty compaction bitmap merge, unrelated tablet map 
operations, and sequence/non-sequence version semantics. 
`build-support/check-format.sh`, `build-support/check-build-hygiene.sh`, and 
`git diff --check` passed.
   
   ```bash
   ./run-be-ut.sh --run 
--filter='SequenceModes/CloudTabletDeleteBitmapCheckTest.*:CloudTabletMgrTest.*:CloudTabletDeleteBitmapTest.*:PrefillModes/CloudTabletDeleteBitmapPrefillTest.*:TabletMetaTest.*:CloudCompactionTest.*'
 -j100
   ```
   
   ### 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]

Reply via email to