-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Not Applicable
-
Storage Engines
-
3
-
나비 (nabi) - 2024-04-16, Nick - 2024-04-30
-
v8.0
The issue here was that we were trying to read a page from the prefetch queue into cache but the cache was full and that triggered eviction. However, eviction found nothing valid to evict and resulted in us being stuck waiting for eviction which eventually resulted in a hang.
The proposed fix for this would be to return a prefetch error once the cache full check (__wt_cache_eviction_check) returns. Then, remove the current ref in this prefetch attempt from the queue and try to read the next queue entry in. Repeat this process until either eviction has evicted eligible pages and we have successfully read prefetch refs into cache, or we have removed all refs from prefetch queue and prefetch becomes a no-op.
Also, include a __wt_cache_eviction_check in the prefetch_queue_push function to guard against adding new refs into the prefetch queue while the cache is full.