-
Notifications
You must be signed in to change notification settings - Fork 853
Return last ring index instead of min_ring_index in prefetch_register_bufferv #12039
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
Conversation
|
If this PR added a GUC in the Postgres fork or If you're an external contributor, a Neon employee will assist in |
|
@knizhnik , could you please clarify why can't this usage of prefetch_register_bufferv() affect the release build?: Doesn't it matter which slot received here? |
8481 tests run: 7899 passed, 0 failed, 582 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
c83bd28 at 2025-06-10T09:57:37.817Z :recycle: |
as you can see only one page is requested here. The problem ca happen only when there are more two or more requests: during processing of second request first slot can be invalidated. |
|
I got it. Thank you for the explanation! |
MMeent
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Problem
See #12018
Now
prefetch_register_buffervcalculates min_ring_index of all vector requests.But because of pump prefetch state or connection failure, previous slots can be already proceeded and reused.
Summary of changes
Instead of returning minimal index, this function should return last slot index.
Actually result of this function is used only in two places. A first place just fort checking (and this check is redundant because the same check is done in
prefetch_register_buffervitself.And in the second place where index of filled slot is actually used, there is just one request.
Sp fortunately this bug can cause only assert failure in debug build.