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

Async connection close handlers #17017

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Async connection close handlers #17017

merged 1 commit into from
Dec 11, 2023

Conversation

Rigidity
Copy link
Contributor

@Rigidity Rigidity commented Dec 8, 2023

Purpose:

This allows for databases queries to be executed inside of the disconnect handler of a peer (for example in the in-development #17012, which rewrites PeerSubscriptions to use an in-memory SQLite database).

Current Behavior:

The close handler interface is a regular function.

New Behavior:

It's now an async function, to support awaiting resources to be cleaned up.

Testing Notes:

@Rigidity Rigidity requested a review from a team as a code owner December 8, 2023 03:28
@Rigidity Rigidity added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Dec 8, 2023
Copy link

Pull Request Test Coverage Report for Build 7137015065

  • 9 of 9 (100.0%) changed or added relevant lines in 6 files are covered.
  • 13 unchanged lines in 8 files lost coverage.
  • Overall coverage increased (+0.03%) to 90.267%

Files with Coverage Reduction New Missed Lines %
chia/introducer/introducer.py 1 78.26%
chia/timelord/timelord_launcher.py 1 69.77%
tests/simulation/test_simulation.py 1 96.52%
chia/data_layer/data_layer.py 2 81.08%
chia/full_node/full_node_api.py 2 77.16%
chia/full_node/full_node.py 2 84.59%
chia/rpc/rpc_server.py 2 88.05%
chia/server/node_discovery.py 2 77.84%
Totals Coverage Status
Change from base Build 7133376678: 0.03%
Covered Lines: 93558
Relevant Lines: 103592

💛 - Coveralls

@Rigidity Rigidity added the ready_to_merge Submitter and reviewers think this is ready label Dec 8, 2023
@cmmarslender cmmarslender merged commit 41047bd into main Dec 11, 2023
253 of 254 checks passed
@cmmarslender cmmarslender deleted the async-disconnect branch December 11, 2023 14:27
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 ready_to_merge Submitter and reviewers think this is ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants