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

also do peak post processing for cancellation in FullNode.short_sync_batch() #16625

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

altendky
Copy link
Contributor

Purpose:

Based on the comment # Still do post processing after cancel (or exception) the intent was to, well, do this on cancellation. In Python 3.7 and before asyncio.CancelledError inherited from Exception but in 3.8 and later it inherits from BaseException. To get the same behavior in both cases we need to explicitly call out asyncio.CancelledError.

Do note that at least the incoming new peak message path here does not get cancelled when the peer is disconnected.

Current Behavior:

New Behavior:

Testing Notes:

Draft for:

  • Should we be doing this this way or just shielding from cancellation?
  • Review all calls to post processing as some do this, some only handled exceptions, some only handle cancellation, and some don't do anything.

@arvidn
Copy link
Contributor

arvidn commented Oct 16, 2023

I agree that this does seem reasonable

@altendky altendky self-assigned this Nov 27, 2023
Copy link
Contributor

github-actions bot commented Jan 9, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the merge_conflict Branch has conflicts that prevent merge to main label Jan 9, 2025
@altendky altendky marked this pull request as ready for review January 9, 2025 19:50
@altendky altendky requested a review from a team as a code owner January 9, 2025 19:50
@github-actions github-actions bot removed the merge_conflict Branch has conflicts that prevent merge to main label Jan 9, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Conflicts have been resolved. A maintainer will review the pull request shortly.

@altendky altendky added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants