-
Notifications
You must be signed in to change notification settings - Fork 17
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
Simplify graphsync cancel #229
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,9 +56,10 @@ type EventsHandler interface { | |
// Error returns are logged but otherwise have no effect | ||
OnChannelCompleted(chid ChannelID, err error) error | ||
|
||
// OnRequestTimedOut is called when a request we opened (with the given channel Id) to receive data times out. | ||
// OnRequestCancelled is called when a request we opened (with the given channel Id) to | ||
// receive data is cancelled by us. | ||
// Error returns are logged but otherwise have no effect | ||
OnRequestTimedOut(chid ChannelID, err error) error | ||
OnRequestCancelled(chid ChannelID, err error) error | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to percolate this change up to go-fil-markets, or lotus? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This interface is only used internally so I don't think we need to make changes anywhere else There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ack. |
||
|
||
// OnRequestDisconnected is called when a network error occurs trying to send a request | ||
OnRequestDisconnected(chid ChannelID, err error) error | ||
|
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.
Since we are changing this state transition and RequestTimedOut is abandoned now, should we migrate all RequestTimedOut to RequestCancelled, so that they're not left in limbo? Or are these terminal states?
Alternatively, we could rename RequestTimedOut to RequestCancelled?
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.
RequestTimedOut & RequestCancelled are events, not states, so I don't think they will get recorded anywhere. I don't think we need to migrate anything.