filecoin-project / go-data-transfer

Data Transfer Shared Component for go-filecoin & go-lotus
Other
39 stars 17 forks source link

Handle error properly when graphsync request's context is cancelled #207

Open jennijuju opened 3 years ago

jennijuju commented 3 years ago

handle https://github.com/filecoin-project/go-data-transfer/blob/master/transport/graphsync/graphsync.go#L185-L191 properly

this might be the cause for https://github.com/filecoin-project/lotus/issues/6273 where the client-side is not getting the Complete message back from the miner

dirkmc commented 3 years ago

The underlying cause actually seems to be a bug in graphsync, as described in the comment:

// TODO: There seems to be a bug in graphsync. I believe it should return
// graphsync.RequestCancelledErr on the errChan if the request's context is
// cancelled, but it doesn't seem to be doing that

So I believe the fix would actually need to be made in go-graphsync.

However for now the code works around the bug.

this might be the cause for filecoin-project/lotus#6273 where the client-side is not getting the Complete message back from the miner

I think filecoin-project/lotus#6273 is actually probably unrelated