mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-27 18:10:37 +00:00
Fix caclulation of LFC used_pages (#11095)
## Problem Async prefetch in LFC PR cause incorrect calculation of LFC `used_pages`when page is overwritten ## Summary of changes Decrement `used_pages` is page is overwritten. --------- Co-authored-by: Konstantin Knizhnik <knizhnik@neon.tech> Co-authored-by: Matthias van de Meent <matthias@neon.tech>
This commit is contained in:
committed by
GitHub
parent
bc052fd0fc
commit
fb1957936c
@@ -1195,9 +1195,11 @@ lfc_writev(NRelFileInfo rinfo, ForkNumber forkNum, BlockNumber blkno,
|
||||
state = GET_STATE(entry, chunk_offs + i);
|
||||
if (state == PENDING) {
|
||||
SET_STATE(entry, chunk_offs + i, REQUESTED);
|
||||
} else if (state != REQUESTED) {
|
||||
} else if (state == UNAVAILABLE) {
|
||||
SET_STATE(entry, chunk_offs + i, PENDING);
|
||||
break;
|
||||
} else if (state == AVAILABLE) {
|
||||
break;
|
||||
}
|
||||
if (!sleeping)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user