-
Notifications
You must be signed in to change notification settings - Fork 14
Fix pause on restart #199
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 pause on restart #199
Conversation
c36f1f6 to
c202f91
Compare
c202f91 to
29bfef7
Compare
aarshkshah1992
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.
@dirkmc Some quick questions. Otherwise LGTM.
| if !restartAgain { | ||
| // No restart queued, we're done | ||
| if mc.cfg.OnRestartComplete != nil { | ||
| mc.cfg.OnRestartComplete(mc.chid) |
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 don't see this getting configured/injected anywhere. What's the purpose of this ?
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.
This is just used by the tests
| if _, ok := t.requestorCancelledMap[chid]; ok { | ||
| _, ok := t.requestorCancelledMap[chid] | ||
| t.dataLock.Unlock() | ||
| if ok { |
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.
Woah. Great catch man ! This could have been causing hairy deadlock issues ...
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.
Yeah I think it actually has caused some deadlock issues, I suspect once we release we'll see a bunch of weird problems go away.
* feat: add isRestart param to validators * fix: on restart dont unpause unstarted transfer (#199)
When there is a restart, and the data transfer hasn't yet started (eg because the data is still being unsealed) the new graphsync request should start off in the paused state