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 zenith_test_evict mode and clear_buffer_cache() function #7803

Merged
merged 1 commit into from
May 22, 2024

Conversation

hlinnaka
Copy link
Contributor

Using InvalidateBuffer is wrong, because if the page is concurrently dirtied, it will throw away the dirty page without calling smgwrite(). In Neon, that means that the last-written LSN update for the page is missed.

In v16, use the new InvalidateVictimBuffer() function that does what we need. In v15 and v14, backport the InvalidateVictimBuffer() function.

Fixes issue #7802

Copy link

github-actions bot commented May 17, 2024

3090 tests run: 2963 passed, 0 failed, 127 skipped (full report)


Flaky tests (1)

Postgres 14

  • test_crafted_wal_end[last_wal_record_xlog_switch]: debug

Code coverage* (full report)

  • functions: 31.4% (6415 of 20429 functions)
  • lines: 48.1% (49329 of 102657 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
e75b7d1 at 2024-05-21T17:21:27.554Z :recycle:

Copy link
Contributor

@knizhnik knizhnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposed fix seems to be correct, but there are no PRs for Postgres submodules.

@hlinnaka hlinnaka marked this pull request as ready for review May 19, 2024 17:42
@hlinnaka hlinnaka requested a review from a team as a code owner May 19, 2024 17:42
@hlinnaka hlinnaka requested a review from save-buffer May 19, 2024 17:42
Using InvalidateBuffer is wrong, because if the page is concurrently
dirtied, it will throw away the dirty page without calling
smgwrite(). In Neon, that means that the last-written LSN update for
the page is missed.

In v16, use the new InvalidateVictimBuffer() function that does what
we need. In v15 and v14, backport the InvalidateVictimBuffer()
function.

Fixes issue #7802
@hlinnaka
Copy link
Contributor Author

Corresponding PRs on the 'postgres' repo:
neondatabase/postgres#419
neondatabase/postgres#420
neondatabase/postgres#421

@hlinnaka hlinnaka merged commit ef96c82 into main May 22, 2024
55 checks passed
@hlinnaka hlinnaka deleted the fix-zenith_test_evict branch May 22, 2024 11:26
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.

2 participants