-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Improve performance of segment metadata cache on Overlord #17785
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
8761bef
Use IndexerMetadataStorageCoordinator on Overlord to mark segments as…
kfaraz b859df1
Add unit tests
kfaraz 7087263
Make cache updates atomic, add some metrics
kfaraz 1b75090
Merge branch 'master' of github.com:apache/druid into mark_unused_via…
kfaraz 68b612f
More cleanup
kfaraz 1dfc781
Simplify datasource-level cache
kfaraz bff3c21
Merge branch 'master' of github.com:apache/druid into mark_unused_via…
kfaraz e342aee
Fix read result set
kfaraz a3409b4
Emit cache stats
kfaraz 075237b
Fix sync for interval with unused segments
kfaraz 4dcb167
Read from cache or store
kfaraz f8d68c1
Do not cache unused segments
kfaraz 9da50f3
Fix result set mapper
kfaraz 0bbf97c
Reduce first sync time
kfaraz abf1d02
Error out on invalid segment IDs
kfaraz 1399572
Fix kill task test
kfaraz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized that the
SegmentsMetadataManager
is the Coordinator version of a metadata cache. Do you think we're moving towards getting rid of it completely on the Overlord side of things, in favor of using onlyIndexerMetadataStorageCoordinator
?It looks like after this patch, the
SegmentsMetadataManager
is still used in two places on the OL:markAsUsedNonOvershadowedSegmentsInInterval
,markAsUsedNonOvershadowedSegments
, andmarkSegmentAsUsed
.OverlordCompactionScheduler
, forgetSnapshotOfDataSourcesWithAllUsedSegments
. to me it seems like this could already be replaced byIndexerSQLMetadataStorageCoordinator#retrieveAllUsedSegments
. (although theSegmentsMetadataManager
version would perform better, since it caches the snapshot, and theIndexerSQLMetadataStorageCoordinator
version needs to build a timeline. I am not sure how much this matters.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, @gianm , I plan to get rid of
SqlSegmentsMetadataManager
from the Overlord completely.Coordinator will continue to use it for the time being, but eventually we might just get rid of it altogether.
SqlSegmentsMetadataManager
byOverlordCompactionScheduler
does matter for performance because of the timeline and caching reasons as you guessed, but I should be able to resolve this soon.