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: Layer delete on drop and eviction can outlive timeline shutdown #7082

Merged
merged 2 commits into from Mar 11, 2024

Conversation

koivunej
Copy link
Contributor

This is a follow-up to #7051 where LayerInner::drop and LayerInner::evict_blocking were not noticed to require a gate before the file deletion. The lack of entering a gate opens up a similar possibility of deleting a layer file which a newer Timeline instance has already checked out to be resident in a similar case as #7051.

@koivunej koivunej requested a review from problame March 11, 2024 08:45
@koivunej koivunej requested a review from a team as a code owner March 11, 2024 08:45
@koivunej koivunej enabled auto-merge (squash) March 11, 2024 08:50
@koivunej
Copy link
Contributor Author

koivunej commented Mar 11, 2024

Ideas on further refinement and/or abstracting the timeline dependency out: Whenever Layer needs a timeline, it should be accompanied by a guard; there is never any other situation.

Copy link

2496 tests run: 2376 passed, 0 failed, 120 skipped (full report)


Flaky tests (2)

Postgres 14

  • test_wal_restore_initdb: debug
  • test_wal_restore: debug

Code coverage* (full report)

  • functions: 28.8% (7033 of 24442 functions)
  • lines: 47.6% (43452 of 91368 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
e99be22 at 2024-03-11T09:33:55.649Z :recycle:

Copy link
Contributor

@problame problame left a comment

Choose a reason for hiding this comment

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

Is this really a follow-up to #7051 ?

Seems to me like it's a similar issue like what was fixed in #7051, but, for the eviction rather the download path.

Would like to see the PR description adjusted if you think that's the case.

@koivunej koivunej merged commit 8c5b310 into main Mar 11, 2024
53 checks passed
@koivunej koivunej deleted the joonas/drop_and_eviction_gate branch March 11, 2024 15:54
VladLazar pushed a commit that referenced this pull request Mar 12, 2024
…7082)

This is a follow-up to #7051 where `LayerInner::drop` and
`LayerInner::evict_blocking` were not noticed to require a gate before
the file deletion. The lack of entering a gate opens up a similar
possibility of deleting a layer file which a newer Timeline instance has
already checked out to be resident in a similar case as #7051.
@koivunej
Copy link
Contributor Author

Is this really a follow-up to #7051 ?

Seems to me like it's a similar issue like what was fixed in #7051, but, for the eviction rather the download path.

Would like to see the PR description adjusted if you think that's the case.

Sorry, I had the auto-merge on. "Follow-up" as in "continuation of the story" or even the google definition "pursue or investigate something further" as in these cases I was thinking of only during weekend.

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

2 participants