mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-26 17:40:37 +00:00
Update LFC cache hit/miss counters
Fixes EXPLAIN (FILECACHE) option
This commit is contained in:
@@ -889,6 +889,9 @@ retry:
|
||||
elog(DEBUG1, "read from local cache file was superseded by concurrent update");
|
||||
goto retry;
|
||||
}
|
||||
|
||||
pgBufferUsage.file_cache.hits += nblocks;
|
||||
|
||||
return;
|
||||
}
|
||||
Assert(request_idx == my_next_slot_idx);
|
||||
@@ -898,6 +901,12 @@ retry:
|
||||
inflight_requests[num_inflight_requests] = request_idx;
|
||||
num_inflight_requests++;
|
||||
|
||||
/*
|
||||
* XXX: If some blocks were in cache but not others, we count all blocks
|
||||
* as a cache miss.
|
||||
*/
|
||||
pgBufferUsage.file_cache.misses += nblocks;
|
||||
|
||||
wait_request_completion(request_idx, &result);
|
||||
Assert(num_inflight_requests == 1);
|
||||
Assert(inflight_requests[0] == request_idx);
|
||||
|
||||
Reference in New Issue
Block a user