-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Checkpoint Cleanup
-
None
-
Storage Engines - Persistence
-
269.215
-
StorEng - Defined Pipeline
-
None
-
6
Problem
test_cc12.test_cc12.test_cursor_freed_page_del_still_reclaimed(non_disagg) fails intermittently on develop:
AssertionError: 7 not greater than or equal to 85 : cleanup did not process the deleted refs: [{'removed': 7, 'rec_page_delete': 0, 'internal_read': 0, 'internal_evicted': 0}]
The test was added by WT-19143 (28d15d9f86).
Reproduction
- Run alone, sequentially: passes 30 of 30.
- 16 parallel workers, 192 runs: failed 4 times on plain develop, and 2 times with the change from PR #14949 applied. The failure is not caused by that PR.
Root cause
The test assumes the parent internal pages stay clean and in memory after the first checkpoint, so checkpoint cleanup finds the 85 deleted refs with their addresses still in the parent's last written image.
- A clean parent can be evicted between that checkpoint and the cursor walk.
- Reading it back in dirties it: __inmem_deleted_ref_should_dirty_parent in bt_page.c does this for non-disagg trees when btree->modified is set.
- The checkpoint that wait_for_cc_to_run() runs just before cleanup then reconciles the dirty parent. That discards the globally visible deleted children and clears their page_del and address.
- Checkpoint cleanup correctly skips those refs ("skipping deleted page already removed by reconciliation", seen 78 times in a failing run). Only refs under parents that stayed clean are counted, which gives 7.
- In failing runs, the stats taken just before the round already show internal page reads and rec_page_delete above zero, which never happens in passing runs.
The code behaves correctly. The assertion removed >= fast_deleted does not hold when a checkpoint resolves refs before cleanup runs.
Proposed fix
Make the test independent of background eviction timing, for example by keeping the parents from being evicted and re-read between the checkpoint and cleanup. Alternatively, count refs resolved by the preceding checkpoint as well in the assertion.
- is caused by
-
WT-19143 Stop checkpoint cleanup from reprocessing deleted refs it has already resolved
-
- Closed
-