bulk: perform meta lookup on range cache miss during index backfill#86492
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Sep 21, 2022
Merged
Conversation
Member
Contributor
|
I'd argue we can release justify it as bug fix in existing functionality |
15d7e4d to
56ab0a3
Compare
Fixes cockroachdb#84290. This commit addresses the sustained slowdown described in cockroachdb#84290 by replacing the call in `SSTBatcher.flushIfNeeded` to `RangeCache.GetCached` with a call to `RangeCache.Lookup`. The former method checks the cache but returns no range descriptor if the cache currently has no overlapping key. This is possible if the descriptor was recently evicted because it was stale. The later method performs a meta lookup if the cache currently has no overlapping key, so it should always return _some_ range descriptor. There's a question of whether we should be logging a warning but proceeding if this meta lookup fails. For now, I've decided not to change that behavior. Release justification: None. Don't merge yet.
56ab0a3 to
5a85950
Compare
Contributor
Author
|
TFTR! Merging on master for now without an immediate backport. Will wait on the backport for a v22.2 patch release. bors r=dt |
Contributor
|
Build failed (retrying...): |
Contributor
|
Build succeeded: |
This file contains hidden or 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
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.
Fixes #84290.
This commit addresses the sustained slowdown described in #84290 by replacing
the call in
SSTBatcher.flushIfNeededtoRangeCache.GetCachedwith a call toRangeCache.Lookup. The former method checks the cache but returns no rangedescriptor if the cache currently has no overlapping key. This is possible if
the descriptor was recently evicted because it was stale. The later method
performs a meta lookup if the cache currently has no overlapping key, so it
should always return some range descriptor.
There's a question of whether we should be logging a warning but proceeding if
this meta lookup fails. For now, I've decided not to change that behavior.
Release justification: None. Don't merge yet.