-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Expose the list of completed ranges in SparseFileTracker #64145
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
Conversation
|
Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore) |
|
@tlrx I'll take a look here shortly. Just FYI the test failure here is reproducible in master as well. I'm looking into it |
|
Test failure is fixed by #64150 |
original-brownbear
left a comment
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.
LGTM
| if (range.isPending()) { | ||
| continue; | ||
| } | ||
| if (completedRanges == null) { |
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.
Random NIT/Question: why use a LinkedList for this, seems if we're actually worried about this running so often that it'll be tricky on the GC ArrayList would perform more predictably and is what we generally use for this type of spot?
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.
Agreed, that's what we usually use, I changed that.
|
Thanks Armin |
This commit adds a new method getCompletedRanges() to the SparseFileTracker class. This will be useful for the persistent cache that will need to retrieve the list of completed ranges before fsyncing a cache file.
This PR adds a new method
getCompletedRanges()to theSparseFileTrackerclass. This will be useful for the persistent cache that will need to retrieve the list of completed ranges before fsyncing a cache file.