Resend prefetch request in case of pageserver restart (#2974)

refer #2819

Co-authored-by: MMeent <matthias@neon.tech>
This commit is contained in:
Konstantin Knizhnik
2022-12-01 12:16:15 +02:00
committed by GitHub
parent edfebad3a1
commit d9ab42013f

View File

@@ -1780,6 +1780,17 @@ neon_read_at_lsn(RelFileNode rnode, ForkNumber forkNum, BlockNumber blkno,
&request_lsn);
slot = GetPrfSlot(ring_index);
}
else
{
/*
* Empty our reference to the prefetch buffer's hash entry.
* When we wait for prefetches, the entry reference is invalidated by
* potential updates to the hash, and when we reconnect to the
* pageserver the prefetch we're waiting for may be dropped,
* in which case we need to retry and take the branch above.
*/
entry = NULL;
}
Assert(slot->my_ring_index == ring_index);
Assert(MyPState->ring_last <= ring_index &&