-
Notifications
You must be signed in to change notification settings - Fork 396
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
Add FullAccessTimeline guard in safekeepers #7887
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adbc507
to
a9c7ae9
Compare
3156 tests run: 3017 passed, 0 failed, 139 skipped (full report)Flaky tests (2)Postgres 16
Postgres 15
Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
07a3e9a at 2024-05-31T13:28:38.434Z :recycle: |
c4fb322
to
81fcfeb
Compare
arssher
approved these changes
May 31, 2024
35d1f54
to
07a3e9a
Compare
petuhovskiy
added a commit
that referenced
this pull request
Jun 1, 2024
During refactoring in #7887 I forgot to add "WAL removal" span with ttid. This commit fixes it.
a-masterov
pushed a commit
that referenced
this pull request
Jun 3, 2024
This is a preparation for #6337. The idea is to add FullAccessTimeline, which will act as a guard for tasks requiring access to WAL files. Eviction will be blocked on these tasks and WAL won't be deleted from disk until there is at least one active FullAccessTimeline. To get FullAccessTimeline, tasks call `tli.full_access_guard().await?`. After eviction is implemented, this function will be responsible for downloading missing WAL file and waiting until the download finishes. This commit also contains other small refactorings: - Separate `get_tenant_dir` and `get_timeline_dir` functions for building a local path. This is useful for looking at usages and finding tasks requiring access to local filesystem. - `timeline_manager` is now responsible for spawning all background tasks - WAL removal task is now spawned instantly after horizon is updated
a-masterov
pushed a commit
that referenced
this pull request
Jun 3, 2024
During refactoring in #7887 I forgot to add "WAL removal" span with ttid. This commit fixes it.
5 tasks
skyzh
pushed a commit
that referenced
this pull request
Jul 19, 2024
There are unused safekeeper runtimes `WAL_REMOVER_RUNTIME` and `METRICS_SHIFTER_RUNTIME`. `WAL_REMOVER_RUNTIME` was implemented in [#4119](#4119) and removed in [#7887](#7887). `METRICS_SHIFTER_RUNTIME` was also implemented in [#4119](#4119) but has never been used. I removed unused safekeeper runtimes `WAL_REMOVER_RUNTIME` and `METRICS_SHIFTER_RUNTIME`.
problame
pushed a commit
that referenced
this pull request
Jul 22, 2024
There are unused safekeeper runtimes `WAL_REMOVER_RUNTIME` and `METRICS_SHIFTER_RUNTIME`. `WAL_REMOVER_RUNTIME` was implemented in [#4119](#4119) and removed in [#7887](#7887). `METRICS_SHIFTER_RUNTIME` was also implemented in [#4119](#4119) but has never been used. I removed unused safekeeper runtimes `WAL_REMOVER_RUNTIME` and `METRICS_SHIFTER_RUNTIME`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a preparation for #6337.
The idea is to add FullAccessTimeline, which will act as a guard for tasks requiring access to WAL files. Eviction will be blocked on these tasks and WAL won't be deleted from disk until there is at least one active FullAccessTimeline.
To get FullAccessTimeline, tasks call
tli.full_access_guard().await?
. After eviction is implemented, this function will be responsible for downloading missing WAL file and waiting until the download finishes.This commit also contains other small refactorings:
get_tenant_dir
andget_timeline_dir
functions for building a local path. This is useful for looking at usages and finding tasks requiring access to local filesystem.timeline_manager
is now responsible for spawning all background tasks