Remove loop from pageserver_try_receive (#11387)

## Problem

Commit
https://github.com/neondatabase/neon/commit/3da70abfa5092bacdebed03d6f771dd28334d479
cause noticeable performance regression (40% in update-with-prefetch in
test_bulk_update):
https://neondb.slack.com/archives/C04BLQ4LW7K/p1742633167580879

## Summary of changes

Remove loop from pageserver_try_receive to make it fetch not more than
one response. There is still loop in `pump_prefetch_state` which can
fetch as many responses as available.

Co-authored-by: Konstantin Knizhnik <knizhnik@neon.tech>
This commit is contained in:
Konstantin Knizhnik
2025-03-31 19:49:32 +00:00
committed by GitHub
co-authored by Konstantin Knizhnik
parent 47d47000df
commit cfe3e6d4e1
2 changed files with 7 additions and 21 deletions
+1 -1
View File
@@ -100,5 +100,5 @@ def test_lfc_prefetch(neon_simple_env: NeonEnv):
prefetch_expired = cur.fetchall()[0][0][0]["Plan"]["Prefetch Expired Requests"]
log.info(f"Unused prefetches: {prefetch_expired}")
# No redundant prefethc requrests if prefetch results are stored in LFC
# No redundant prefetch requests if prefetch results are stored in LFC
assert prefetch_expired == 0