Skip to content

Conversation

@dirkmc
Copy link
Contributor

@dirkmc dirkmc commented Apr 28, 2021

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

@dirkmc dirkmc changed the base branch from master to feat/validator-restart-param April 28, 2021 12:38
@dirkmc dirkmc force-pushed the fix/pause-on-restart branch from c36f1f6 to c202f91 Compare April 28, 2021 14:02
@dirkmc dirkmc force-pushed the fix/pause-on-restart branch from c202f91 to 29bfef7 Compare April 28, 2021 15:19
@dirkmc dirkmc requested a review from aarshkshah1992 April 28, 2021 15:30
Copy link
Contributor

@aarshkshah1992 aarshkshah1992 left a 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)
Copy link
Contributor

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 ?

Copy link
Contributor Author

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 {
Copy link
Contributor

@aarshkshah1992 aarshkshah1992 May 4, 2021

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

Copy link
Contributor Author

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.

@dirkmc dirkmc merged commit 4881611 into feat/validator-restart-param May 6, 2021
@dirkmc dirkmc deleted the fix/pause-on-restart branch May 6, 2021 07:08
dirkmc added a commit that referenced this pull request May 6, 2021
* feat: add isRestart param to validators

* fix: on restart dont unpause unstarted transfer (#199)
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.

3 participants