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

Ignore page header when comparing VM pages in test_vm_bits.py #7499

Merged
merged 1 commit into from
May 8, 2024

Conversation

knizhnik
Copy link
Contributor

@knizhnik knizhnik commented Apr 24, 2024

Problem

See #6714, #6967

Summary of changes

Completely ignore page header when comparing VM pages.

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

@hlinnaka
Copy link
Contributor

# Also in neon SMGR we can replace empty heap page with zero (uninitialized) heap page.

This sounds scary. Why does that happen?

@hlinnaka
Copy link
Contributor

# Also in neon SMGR we can replace empty heap page with zero (uninitialized) heap page.

This sounds scary. Why does that happen?

Also, this is about a VM page; how is replacing an empty heap page with an all-zeros page related to this?

Copy link

github-actions bot commented Apr 24, 2024

3024 tests run: 2891 passed, 0 failed, 133 skipped (full report)


Flaky tests (1)

Postgres 14

  • test_statvfs_pressure_usage: debug

Code coverage* (full report)

  • functions: 31.4% (6313 of 20125 functions)
  • lines: 47.3% (47575 of 100666 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
de9a33f at 2024-05-08T16:40:08.424Z :recycle:

@jcsp
Copy link
Contributor

jcsp commented Apr 30, 2024

Is anything blocking this? I notice it doesn't have a reviewer assigned.

Chasing because it's the most frequent failure in the suite.

@knizhnik
Copy link
Contributor Author

knizhnik commented May 7, 2024

Also, this is about a VM page; how is replacing an empty heap page with an all-zeros page related to this?

Sorry, you are right. It is not somehow related to VM.
Looks like the different scenario takes place:

  • when VM is extended using smgr_zeroextend zero page is walloged.
  • then page is initialised by vm_readbuf. This operation isNOT walloged. If page is thrown from shared buffers, then it will be walloged and neon_smgr (special behaviour for VM/FSM forks). But if it is not evicted from shared buffers then it is walloged.
  • test compares local VM page image (initialized page) with page received from PS (zero page), which cause assertion failure.

So despite to the fact that my explanation of the source of the problem were not correct, this PR is still relevant.

@skyzh
Copy link
Member

skyzh commented May 7, 2024

I don't know Postgres internals but the explanation of why header is different sounds reasonable. Approving to make test suites more stable.

@knizhnik knizhnik force-pushed the fix-test_vm_bit_clear_on_heap_lock-flake-v2 branch from 3b5876c to de9a33f Compare May 8, 2024 15:55
@knizhnik knizhnik merged commit b06eec4 into main May 8, 2024
53 checks passed
@knizhnik knizhnik deleted the fix-test_vm_bit_clear_on_heap_lock-flake-v2 branch May 8, 2024 17:58
a-masterov pushed a commit that referenced this pull request May 20, 2024
## Problem

See #6714, #6967

## Summary of changes

Completely ignore page header when comparing VM pages.

## 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>
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.

None yet

4 participants