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): metric regression with too many canceled evictions #7363
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
2766 tests run: 2648 passed, 0 failed, 118 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
b837401 at 2024-04-18T15:35:23.297Z :recycle: |
arpad-m
previously requested changes
Apr 11, 2024
the api is not perfect, but assume that this will not be used for anything except the `Drop` time inspection.
otherwise in the case where the value was uninitialized, we would had lost the permit as shown by test case in the next commit. of course, it is unnecessary to reinit the semaphore at all in this case.
this revealed a bug with missing InitPermit wrapping which I've fixed in previous commit.
intention is clearer, and we avoid the unnecessary reinit of a new semaphore.
koivunej
force-pushed
the
joonas/layer_gone_gone
branch
from
April 16, 2024 09:44
f06ee0e
to
82daf28
Compare
VladLazar
approved these changes
Apr 18, 2024
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.
#7030 introduced an annoying papercut, deeming a failure to acquire a strong reference to
LayerInner
fromDownloadedLayer::drop
as a canceled eviction. Most of the time, it wasn't that, but just timeline deletion or tenant detach with the layer not wanting to be deleted or evicted.When a Layer is dropped as part of a normal shutdown, the
Layer
is dropped first, and theDownloadedLayer
the second. Because of this, we cannot detect eviction being canceled from theDownloadedLayer::drop
. We can detect it fromLayerInner::drop
, which this PR adds.Test case is added which before had 1 started eviction, 2 canceled. Now it accurately finds 1 started, 1 canceled.