yugabyte/yugabyte-db

[DocDB] CleanupHiddenTablets -> DeleteOrHideTabletsAndSendRequests does not acquire tablet locks in sorted table id order

Open

#32,572 opened on Jul 10, 2026

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C (1,003 forks)batch import
area/docdbgood first issuekind/bugpriority/mediumstatus/awaiting-triage

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.

Contributor guide