ipfs / go-graphsync

Initial Implementation Of GraphSync Wire Protocol
Other
100 stars 38 forks source link

feat: SendUpdates() API to send only extension data to via existing requests #358

Closed rvagg closed 2 years ago

rvagg commented 2 years ago

Closes: https://github.com/ipfs/go-graphsync/issues/348

WIP, figuring out the testing parts of this currently

rvagg commented 2 years ago

Relevant race failure in one of the actions runners:

  === RUN   TestUpdateResponse/while_unpaused
      responsemanager_test.go:901: 
            Error Trace:    channelassertions.go:44
                                        channelassertions.go:15
                                        responsemanager_test.go:901
            Error:          Not equal: 
                            expected: 0
                            actual  : 1
            Test:           TestUpdateResponse/while_unpaused
            Messages:       should send first extension response
  === RUN   TestUpdateResponse/while_paused
  --- FAIL: TestUpdateResponse (10.12s)
      --- FAIL: TestUpdateResponse/while_unpaused (10.00s)
      --- PASS: TestUpdateResponse/while_paused (0.12s)

I'll have to figure that one out before this is merged.

rvagg commented 2 years ago

Can't repro the error locally with or without race, on 1.17 or 1.16. I've moved around a synchronize() call but I don't think that's a good explanation for the failure. It remains a bit of a concern since I can't explain it but I'll wait for review because maybe I'm missing something obvious.

rvagg commented 2 years ago

https://github.com/ipfs/go-graphsync/pull/360 fixed the race; so this is now squashed, rebased and ready to roll.