[DocDB] CleanupHiddenTablets -> DeleteOrHideTabletsAndSendRequests does not acquire tablet locks in sorted table id order
#32,572 opened on Jul 10, 2026
Repository metrics
- Stars
- (8,229 stars)
- PR merge metrics
- (Avg merge 17d 21h) (92 merged PRs in 30d)
Description
Jira Link: DB-22278
Description
Code correctness issue, no repro.
Comment at https://github.com/yugabyte/yugabyte-db/blob/541b6495f0c129bc8d189d0da27ff68036f6fff4/src/yb/master/catalog_manager.cc#L11632 says we should expect the list to be in tablet id sorted order. But the call from https://github.com/yugabyte/yugabyte-db/blob/541b6495f0c129bc8d189d0da27ff68036f6fff4/src/yb/master/catalog_manager_ext.cc#L3307 does not ensure this. This can potentially lead to a deadlock.
@mdbridge @druzac
Ideally, we can assert this while acquiring locks in debug mode so that such cases are reported by unit tests.
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information
- I confirm this issue does not contain any sensitive information.