Skip to content
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

Fix #408: Race condition when StateSync runs #415

Merged
merged 1 commit into from May 14, 2018

Conversation

hsanjuan
Copy link
Collaborator

When StateSync() runs and triggers Untrack() on items
that have just been removed from the state but on which
Untrack() is underway, the operation tracker would be
reset to phase queued and in some cases stay so.

Also happened for Track()

This caused failures of TestClustersPin as SyncStatus()
is triggered regularly while Tracks() and Untracks() happen.

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

@hsanjuan hsanjuan requested a review from lanzafame May 11, 2018 17:49
@ghost ghost assigned hsanjuan May 11, 2018
@ghost ghost added the status/in-progress In progress label May 11, 2018
@hsanjuan
Copy link
Collaborator Author

Disregard Windows failures in jenkins

@hsanjuan hsanjuan added need/review Needs a review and removed status/in-progress In progress labels May 11, 2018
@hsanjuan hsanjuan mentioned this pull request May 11, 2018
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 a comment fix.

return nil // cancelled while in queue, all done
case opc.op == operationUnpin && opc.phase == phaseInProgress:
mpt.optracker.finish(c.Cid)
// cancelled while unpinning: continue and trigger unpin
Copy link
Contributor

Choose a reason for hiding this comment

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

s/trigger unpin/trigger pin

When StateSync() runs and triggers Untrack() on items
that have just been removed from the state but on which
Untrack() is underway, the operation tracker would be
reset to phase queued and in some cases stay so.

Also happened for Track()

This caused failures of TestClustersPin as SyncStatus()
is triggered regularly while Tracks() and Untracks() happen.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
@hsanjuan hsanjuan force-pushed the fix/408-TestClustersPin-final branch from 68555ec to 73aabfa Compare May 12, 2018 08:50
@ghost ghost added the status/in-progress In progress label May 12, 2018
@hsanjuan hsanjuan merged commit e9cf656 into master May 14, 2018
@ghost ghost removed the status/in-progress In progress label May 14, 2018
@hsanjuan hsanjuan deleted the fix/408-TestClustersPin-final branch May 14, 2018 09:52
@lanzafame lanzafame removed the need/review Needs a review label May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants