-
Type:
Bug
-
Resolution: Won't Do
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Checkpoints, Schema Management
-
Storage Engines - Persistence
-
409.44
-
None
-
None
-
64
When a REMOVE is processed at checkpoint, __disagg_accumulate_drop_size decides what to subtract from database_size using (a) whether the URI is in local metadata now and (b) the checkpoint entry in the queue entry's metadata snapshot. Neither identifies the incarnation the REMOVE belongs to, so create/drop/create reuse of one URI corrupts the accounting in both directions.
Deterministic leak (attached test_disagg_checkpoint_size23.py, single-threaded, one cycle): create + data + checkpoint; drop; recreate the URI before the next checkpoint; drop again. Nothing is left in the database and every REMOVE was processed, but the data's size never leaves database_size:
empty=1050207, with_data=1563863, after_all_dropped=1563571
The URI is present at processing time, so the REMOVE is treated as a rolled-back drop (conn_layered.c:649) and skipped.
Over-subtraction (measured in test/csuite/schema_disagg_abort under create/drop churn): one checkpoint subtracted 41,241 bytes — 233 x the same 177-byte checkpoint entry of one reused URI — breaching WT_ASSERT(database_size >= WT_DISAGG_CHECKPOINT_SIZE_BUFFER) (checkpoint_txn.c:1030). The floor is easy to breach because database_size is seeded to exactly the buffer (checkpoint_txn.c:977), so the margin is only the accounted user data. Repro: test_schema_disagg_abort -r l -t 10 -T 2 -u 4, ~30% of runs.
Likely the size-accounting symptom of the stale-metadata-under-URI-reuse family (WT-18068, WT-18230). debug.database_size_fix already exists to repair the drift wholesale. Reproduced at develop merge-base 6bb7d02485; src/ unmodified.
- is related to
-
WT-18282 Decouple schema_disagg_abort checkpoints from the event stream
-
- Closed
-
-
WT-18068 Follower reads stale btree ID after leader create/drop/create of a layered table
-
- In Code Review
-
-
WT-18322 Read the drop size from the shared metadata table instead of a queue-entry snapshot
-
- Closed
-
-
WT-18230 Disagg checkpoint can expose a recreated table before it is visible
-
- Closed
-
- related to
-
WT-16927 Implement a mechanism in wt_verify to fix WiredTiger's metadata if it finds checkpoint size discrepancy
-
- Open
-
-
WT-18068 Follower reads stale btree ID after leader create/drop/create of a layered table
-
- In Code Review
-
-
WT-18039 Enable the disaggregated size underflow checks in production
-
- Open
-
-
WT-18423 Handle an overflow in the disaggregated database size accounting
-
- Open
-
-
WT-18399 Clamp database size at WT_DISAGG_CHECKPOINT_SIZE_BUFFER during delta computation
-
- Closed
-
-
WT-18230 Disagg checkpoint can expose a recreated table before it is visible
-
- Closed
-