-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Cache and Eviction
-
None
-
Storage Engines
-
1
-
StorEng - 2025-02-04
WT-13790 added a feature flag that switches on and off behavior introduced in WT-12644. However, one adjustment to the behavior was overlooked. Specifically, the switch of "goto" labels here:
@@ -2017,12 +2073,14 @@ __evict_walk_prepare(WT_SESSION_IMPL *session, uint32_t *walk_flagsp) case WT_EVICT_WALK_NEXT: /* Each time when evict_ref is null, alternate between linear and random walk */ if (btree->evict_ref == NULL && (++btree->linear_walk_restarts) & 1) - goto rand_next; + /* Alternate with rand_prev so that the start of the tree is visited more often */ + goto rand_prev; break; case WT_EVICT_WALK_PREV: /* Each time when evict_ref is null, alternate between linear and random walk */ if (btree->evict_ref == NULL && (++btree->linear_walk_restarts) & 1) - goto rand_prev; + /* Alternate with rand_next so that the end of the tree is visited more often */ + goto rand_next; FLD_SET(*walk_flagsp, WT_READ_PREV); break;