-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Layered Tables
-
Security Level: Public (Available to anyone on the web)
-
Storage Engines - Foundations
-
1,812.988
-
SE Foundations - 2026-06-09, SE Foundations - 2026-06-23, SE Foundations - 2026-07-07
-
5
Issue Summary
When creating and opening cursors on layered tables in disagg, the system does not sweep these cursors even after they are released and the session is closed via the URI. This behavior is due to an explicit skip implemented in the codebase for sweeping layered tables (
src/conn/conn_sweep.c#L107
). As a result, a large number of data handles remain open, which can lead to hitting OS-level file descriptor limits, especially with workloads involving hundreds of thousands of tables.
Context
- Reporter observed the issue locally, encountering errors such as:
__posix_directory_sync, 241: WT_TEST_0_0/: directory-sync: open: Too many open files
- The explicit skip for sweeping layered tables is a hot fix to avoid closing layered dhandles while ingest btrees are still open.
- With public preview workloads expected to reach ~250k collections (~500k tables), this issue could become critical.
- Other users confirmed hitting file descriptor limits with as few as 50k collections (~67k file descriptors).
- Suggestion was made to change the layered dhandle array to a hash map to better handle large numbers of collections.
- Relevant code: conn_sweep.c#L107
Proposed Solution
- Revisit the sweeping logic for layered tables to ensure data handles are properly closed after cursor and session release.
- Consider restructuring the layered dhandle array into a hash map to improve scalability for workloads with large numbers of collections.
- Address this issue before public preview to prevent file descriptor exhaustion and potential crashes.
Original Slack thread: Slack Thread
This ticket was generated by AI from a Slack thread.
- causes
-
WT-17990 TSan data race on txn_global.last_ckpt_timestamp between checkpoint and sweep server
-
- Closed
-
- is related to
-
WT-17961 Discovery: Table Creation & Collection Scaling for Public Preview (DSC)
-
- In Progress
-
- related to
-
WT-17990 TSan data race on txn_global.last_ckpt_timestamp between checkpoint and sweep server
-
- Closed
-
-
WT-17956 Investigate having a more conservative max_ingest_write_ts for single tree workloads
-
- Open
-
-
WT-16982 Provide long term solution layered dhandles and ingest tables
-
- Backlog
-
-
WT-17791 Optimise direct ingest creation to mitigate core startup bottlenecks
-
- Closed
-
-
WT-17779 Ingest tables do not need any disk files
-
- Open
-