Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error message if PS connection is lost while receiving prefetch #9923

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

hlinnaka
Copy link
Contributor

If the pageserver connection is lost while receiving the prefetch request, the prefetch queue is cleared. The error message prints the values from the prefetch slot, but because the slot was already cleared, they're all zeros:

LOG:  [NEON_SMGR] [shard 0] No response from reading prefetch entry 0: 0/0/0.0 block 0. This can be caused by a concurrent disconnect

To fix, make local copies of the values.

In the passing, also add a sanity check that if the receive() call succeeds, the prefetch slot is still intact.

If the pageserver connection is lost while receiving the prefetch
request, the prefetch queue is cleared. The error message prints the
values from the prefetch slot, but because the slot was already
cleared, they're all zeros:

    LOG:  [NEON_SMGR] [shard 0] No response from reading prefetch entry 0: 0/0/0.0 block 0. This can be caused by a concurrent disconnect

To fix, make local copies of the values.

In the passing, also add a sanity check that if the receive() call
succeeds, the prefetch slot is still intact.
@hlinnaka hlinnaka requested review from a team as code owners November 28, 2024 13:25
@arpad-m
Copy link
Member

arpad-m commented Nov 28, 2024

Copy link

6941 tests run: 6633 passed, 0 failed, 308 skipped (full report)


Flaky tests (3)

Postgres 17

Postgres 15

Postgres 14

Code coverage* (full report)

  • functions: 30.6% (7983 of 26064 functions)
  • lines: 48.5% (63379 of 130562 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
cf7b289 at 2024-11-28T14:30:14.284Z :recycle:

@hlinnaka hlinnaka added this pull request to the merge queue Dec 6, 2024
Merged via the queue into main with commit b6eea65 Dec 6, 2024
82 checks passed
@hlinnaka hlinnaka deleted the fix-disconnect-error-message branch December 6, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants