Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

StateSync(): some improvements #429

Merged
merged 1 commit into from
May 25, 2018
Merged

StateSync(): some improvements #429

merged 1 commit into from
May 25, 2018

Conversation

hsanjuan
Copy link
Collaborator

This commit:

  • Does not collect and return changed items when doing StateSync (they are
    not used)
  • Removes the StateSync RPC method (no longer used)
  • Uses tracker.StatusAll() rather than requesting Status on each Cid (should
    be faster with upcoming pintracker)
  • Does not launch a go-routine to track every item. Track is an async
    operation. This likely causes 1000s goroutines to be started with no good
    reason.

License: MIT
Signed-off-by: Hector Sanjuan code@hector.link

@hsanjuan hsanjuan self-assigned this May 24, 2018
@hsanjuan hsanjuan requested a review from lanzafame May 24, 2018 14:53
@ghost ghost added the status/in-progress In progress label May 24, 2018
@coveralls
Copy link

coveralls commented May 24, 2018

Coverage Status

Coverage increased (+0.1%) to 68.303% when pulling 4d8f975 on fix/StatusSync into 6d9ddfa on master.

Copy link
Contributor

@lanzafame lanzafame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just need to update docstring

cluster.go Outdated
@@ -728,29 +728,34 @@ func (c *Cluster) Join(addr ma.Multiaddr) error {
// StateSync syncs the consensus state to the Pin Tracker, ensuring
// that every Cid that should be tracked is tracked. It returns
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring needs updating.

This commit:

* Does not collect and return changed items when doing StateSync (they are
not used)
* Removes the StateSync RPC method (no longer used)
* Uses tracker.StatusAll() rather than requesting Status on each Cid (should
be faster with upcoming pintracker)
* Does not launch a go-routine to track every item. Track is an async
operation. This likely causes 1000s goroutines to be started with no good
reason.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
@hsanjuan hsanjuan merged commit 2e05583 into master May 25, 2018
@hsanjuan hsanjuan deleted the fix/StatusSync branch May 25, 2018 08:29
@ghost ghost removed the status/in-progress In progress label May 25, 2018
@hsanjuan hsanjuan mentioned this pull request May 25, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants