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

pageserver: respect has_relmap_file in collect_keyspace #8276

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Jul 5, 2024

Problem

Rarely, a dbdir entry can exist with no relmap_file_key data. This causes compaction to fail, because it assumes that if the database exists, then so does the relmap file.

Basebackup already handled this using a boolean to record whether such a key exists, but collect_keyspace didn't.

Closes: #8237

Summary of changes

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

@jcsp jcsp added t/bug Issue Type: Bug c/storage/pageserver Component: storage: pageserver labels Jul 5, 2024
Copy link

github-actions bot commented Jul 5, 2024

3042 tests run: 2927 passed, 0 failed, 115 skipped (full report)


Code coverage* (full report)

  • functions: 32.6% (6938 of 21281 functions)
  • lines: 50.0% (54545 of 109057 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
9717551 at 2024-07-08T14:16:28.455Z :recycle:

@jcsp jcsp marked this pull request as ready for review July 5, 2024 14:00
@jcsp jcsp requested a review from a team as a code owner July 5, 2024 14:00
@jcsp jcsp requested a review from VladLazar July 5, 2024 14:00
@jcsp jcsp enabled auto-merge (squash) July 8, 2024 11:44
@jcsp jcsp merged commit fcdf060 into main Jul 8, 2024
65 checks passed
@jcsp jcsp deleted the jcsp/issue-8237-relfilemap branch July 8, 2024 14:39
skyzh pushed a commit that referenced this pull request Jul 15, 2024
## Problem

Rarely, a dbdir entry can exist with no `relmap_file_key` data. This
causes compaction to fail, because it assumes that if the database
exists, then so does the relmap file.

Basebackup already handled this using a boolean to record whether such a
key exists, but `collect_keyspace` didn't.

## Summary of changes

- Respect the flag for whether a relfilemap exists in collect_keyspace
- The reproducer for this issue will merge separately in
#8232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/storage/pageserver Component: storage: pageserver t/bug Issue Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pageserver: compaction "key not found" on RelMap keys error under some pg_regress edge case
2 participants