Skip to content

Conversation

@tlrx
Copy link
Member

@tlrx tlrx commented Oct 26, 2020

This PR 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.

@tlrx tlrx added >enhancement :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.0.0 v7.11.0 labels Oct 26, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore)

@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Oct 26, 2020
@original-brownbear
Copy link
Contributor

@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

@original-brownbear
Copy link
Contributor

Test failure is fixed by #64150

Copy link
Contributor

@original-brownbear original-brownbear left a 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) {
Copy link
Contributor

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?

Copy link
Member Author

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.

@tlrx tlrx merged commit f1930ae into elastic:master Oct 26, 2020
@tlrx tlrx deleted the expose-completed-ranges branch October 26, 2020 13:44
@tlrx
Copy link
Member Author

tlrx commented Oct 26, 2020

Thanks Armin

tlrx added a commit to tlrx/elasticsearch that referenced this pull request Oct 26, 2020
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.
tlrx added a commit that referenced this pull request Oct 27, 2020
…4163)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v7.11.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants