-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
8
-
Storage Engines - 2022-10-31, Storage Engines - 2022-11-14
The cursor statistic cursor_next_skip_lt_100 (same for cursor_prev_skip_lt_100) is somewhat misleading as we increment it when we skip 0 entries, it is unclear if this is intended or not as technically 0 is less than 100 but also it seems not meaningful to record when we don't skip any entries.
The relevant code is here:
err: if (total_skipped < 100) WT_STAT_CONN_DATA_INCR(session, cursor_next_skip_lt_100); else WT_STAT_CONN_DATA_INCR(session, cursor_next_skip_ge_100); WT_STAT_CONN_DATA_INCRV(session, cursor_next_skip_total, total_skipped);
If total skipped is 0 is it clear we still increment the skip_lt_100 stat. The same functionality exists in cursor prev.
The consensus in the comments means that we agree this should be fixed, the scope for fixing it will be:
- Fix the relevant if checks to be if (total_skipped != 0 && total_skipped < 100). For both cursor_next and cursor_prev.
- Fix broken tests that relied on those statistics. If too many tests break as a result then the ticket can be broken down further.
- causes
-
WT-10192 Fix bug in cursor_prev_skip statistics
- Closed