Skip to content
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

Return Request context cancelled error #93

Merged
merged 2 commits into from
Sep 17, 2020

Conversation

aarshkshah1992
Copy link
Contributor

@aarshkshah1992 aarshkshah1992 commented Sep 15, 2020

As discussed, if the user's request context is cancelled for whatever reason, we should write that error to the reponse error channel.

@hannahhoward Because we ignore context cancellation errors here:

if !isContextErr(err) {

we had a race wherein we'd mark a request as "completed" even though the context is cancelled because we close the response error channel here without writing anything to it. Have fixed that as well.

LMKWYT.

@welcome
Copy link

welcome bot commented Sep 15, 2020

Thank you for submitting this PR!
A maintainer will be here shortly to review it.
We are super grateful, but we are also overloaded! Help us by making sure that:

  • The context for this PR is clear, with relevant discussion, decisions
    and stakeholders linked/mentioned.

  • Your contribution itself is clear (code comments, self-review for the
    rest) and in its best form. Follow the code contribution
    guidelines

    if they apply.

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
Next steps:

  • A maintainer will triage and assign priority to this PR, commenting on
    any missing things and potentially assigning a reviewer for high
    priority items.

  • The PR gets reviews, discussed and approvals as needed.

  • The PR is merged by maintainers when it has been approved and comments addressed.

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution.
We are very grateful for your contribution!

@aarshkshah1992
Copy link
Contributor Author

@hannahhoward The test that is failing on the CI succeeds locally for me a 100 times:

aarshshah@Aarshs-MacBook-Pro requestmanager % go test -race -count 100 -run TestLocallyFulfilledFirstRequestSucceedsLater
PASS
ok  	github.com/ipfs/go-graphsync/requestmanager	0.939s

Is this a known flaky test ?

Copy link
Collaborator

@hannahhoward hannahhoward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - don't worry about that test, yes that one particular test is flaky and I've been unable to fix it from being that way. apologies.

@aarshkshah1992 aarshkshah1992 merged commit 29acd2c into master Sep 17, 2020
@aarshkshah1992 aarshkshah1992 deleted the fix/request-cancel-error branch September 17, 2020 03:43
@aschmahmann aschmahmann mentioned this pull request Feb 18, 2021
73 tasks
marten-seemann pushed a commit that referenced this pull request Mar 2, 2023
* Emit events with received cids (#71)

* persist received cids on channel state.

* Send, Receive and Validate Restart requests (#75)

* Send, Receive and Validate Requests

* Initiating and Responding Tests and bug fixes (#76)

* Testing for resuming data transfer work

* Cleanup Push Restarts PR  (#79)

* cleanup of restart PR

* link the peers

* Tests for pull restarts (#84)

* tests for pull restarts

* Merge Tests cleanup work (#92)

* cleanup of restart PR

* cleanup timedout channels (#93)

* backward compatibility of restart (#96)

* backward compatibility of restart

* changes and tests

* more tests

* better error handling for restarts

* feat(message): switch to cbor map encoding (#97)

switch to cbor map encoding for the 1_1 message protocol

* feat(channels): setup datastore migrations (#99)

setup datatransfer channels so they migrate over successfully

Co-authored-by: Hannah Howard <[email protected]>
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.

2 participants