mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-17 02:12:56 +00:00
Set last written LSN for prefetched pages to avoid false invalidation of prefetch results
This commit is contained in:
@@ -681,6 +681,14 @@ prefetch_do_request(PrefetchRequest *slot, bool *force_latest, XLogRecPtr *force
|
||||
Assert(slot->my_ring_index == MyPState->ring_unused);
|
||||
page_server->send((NeonRequest *) &request);
|
||||
|
||||
/* Remember request LSN for the prefetched page to avoid false pefetch invalidations */
|
||||
SetLastWrittenLSNForBlock(
|
||||
request.req.lsn,
|
||||
slot->buftag.rnode,
|
||||
slot->buftag.forkNum,
|
||||
slot->buftag.blockNum
|
||||
);
|
||||
|
||||
/* update prefetch state */
|
||||
MyPState->n_requests_inflight += 1;
|
||||
MyPState->n_unused -= 1;
|
||||
|
||||
Reference in New Issue
Block a user