-
Notifications
You must be signed in to change notification settings - Fork 377
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
Do not produce error if gin page is not restored in redo #7876
Conversation
Thank you! As usual: can you please add a test that fails without this patch and passes with it |
@hlinnaka @lubennikovaav @MMeent any thoughts? 3 one-line patches. |
FYI: there is a #7875 that is an alternative solution |
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.
I think this is fine, though preferably we should check we're on a Neon read replica before deciding not to error out.
3150 tests run: 3017 passed, 0 failed, 133 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
4236b6a at 2024-05-29T19:17:05.571Z :recycle: |
I know how to check that:
One more moment: this redo code is also used by walredo process at PS. It is definitely not a replica. But we should not also produce error in this case (most likely it will never happen because this WAL record is always applied to target page). |
Sorry, but this PR requires 3 more approvals for Postgres submodules. |
Can you please add test that fails without this patch and passes with it. And +1 on adding a check for replica.
E.g. to not to lose ability to run |
I first of all thought about checking There is
But it seems to be not correct because replica has to apply WAL records even before it reaches consistent snapshot. And do not remember about walredo process: it is not a replica, but we still need to mute this error. |
hm, do we? is that normal for
|
walredo is using it own filter:
It restores only pages requested for walredo. Still not sure which check to insert here... |
ok, let's skip a check then. but test is still needed -- I think it shouldn't be a problem to reproduce that error? |
Test added |
@neondatabase/compute pls ack it -- there is a customer who needs this fix |
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.
The log message in the gin redo code is now incorrect. Please revert the check to != BLK_RESTORED
Sorry, the simpler fix is, the higher probability to make stupid error:( |
Next time, please include links to the PG PRs if you have them, it helps determine the scope of PRs to review |
## Problem See neondatabase/cloud#10845 ## Summary of changes Do not report error if GIN page is not restored ## Checklist before requesting a review - [ ] I have performed a self-review of my code. - [ ] If it is a core feature, I have added thorough tests. - [ ] Do we need to implement analytics? if so did you add the relevant metrics to the dashboard? - [ ] If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section. ## Checklist before merging - [ ] Do not forget to reformat commit message to not include the above checklist --------- Co-authored-by: Konstantin Knizhnik <knizhnik@neon.tech>
Problem
See https://github.com/neondatabase/cloud/issues/10845
Summary of changes
Do not report error if GIN page is not restored
Checklist before requesting a review
Checklist before merging