Issue Summary
The progress counters max_count and rollback_count in
rts.c
are inflated because they include files with URIs matching WT_BTREE_PREFIX(uri), which also matches history store (e.g., file:WiredTigerHS.wt, file:WiredTigerSharedHS.wt_stable) and metadata files (e.g., file:WiredTiger.wt, file:WiredTigerShared.wt_stable). These files are subsequently filtered out in __wti_rts_btree_walk_btree_apply, but the counters are still incremented, resulting in progress messages reporting incorrect totals. There is no correctness impact on RTS itself.
Context
- The issue occurs in
src/rollback_to_stable/rts.c
.
- The current logic increments the counters for any URI matching WT_BTREE_PREFIX, including history store and metadata files.
- These files are then ignored by the inner logic in
rts_btree_walk.c
:
if (!WT_BTREE_PREFIX(uri) || WT_IS_URI_HS(uri) || WT_IS_URI_METADATA(uri)) return (0);
- As a result, progress messages from __wti_rts_progress_msg are misleading.
Proposed Solution
Apply the same guards in the counter logic in
rts.c
so only files actually processed by RTS are counted:
if (WT_BTREE_PREFIX(uri) && !WT_IS_URI_HS(uri) && !WT_IS_URI_METADATA(uri)) ++max_count; /* first pass */ if (WT_BTREE_PREFIX(uri) && !WT_IS_URI_HS(uri) && !WT_IS_URI_METADATA(uri)) ++rollback_count; /* second pass */
This will ensure the progress counters accurately reflect the number of files processed, aligning with the filtering in __wti_rts_btree_walk_btree_apply.
Original Slack thread: https://mongodb.slack.com/archives/C0AKD3HPD8T/p1776380188507509
This ticket was generated by AI from a Slack thread.
- related to
-
WT-17232 test_prepare33 checkpoint_and_verify_stats assertion error
-
- In Progress
-