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(pageserver): refresh_gc_info should always increase cutoff #9862

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

skyzh
Copy link
Member

@skyzh skyzh commented Nov 22, 2024

Problem

close https://github.com/neondatabase/cloud/issues/19671

Timeline -----------------------------
         ^ last GC happened LSN
              ^ original retention period setting = 24hr
> refresh-gc-info updates the gc_info
              ^ planned cutoff (gc_info)
         ^ customer set retention to 48hr, and it's still within the last GC LSN
         ^1   ^2 we have two choices: (1) update the planned cutoff to
                 move backwards, or (2) keep the current one

In this patch, we decided to keep the current cutoff instead of moving back the gc_info to avoid races. In the future, we could allow the planned gc cutoff to go back once cplane sends a retention_history tenant config update, but this requires a careful revisit of the code.

Summary of changes

Ensure that GC cutoffs never go back if retention settings get changed.

@skyzh skyzh requested a review from a team as a code owner November 22, 2024 19:34
@skyzh skyzh requested a review from arpad-m November 22, 2024 19:34
@skyzh skyzh force-pushed the skyzh/gc-cutoff-never-go-back branch from 095b2c6 to d78e3a9 Compare November 22, 2024 19:54
Copy link

github-actions bot commented Nov 22, 2024

5579 tests run: 5361 passed, 0 failed, 218 skipped (full report)


Flaky tests (2)

Postgres 17

Code coverage* (full report)

  • functions: 31.4% (7958 of 25346 functions)
  • lines: 49.3% (63162 of 128163 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
d78e3a9 at 2024-11-22T22:34:41.817Z :recycle:

@skyzh
Copy link
Member Author

skyzh commented Nov 22, 2024

neither of the test failure is related to the patch itself... i suppose

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.

1 participant