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

Fix/terminate node gracefully #3751

Merged
merged 7 commits into from
Jun 29, 2023
Merged

Fix/terminate node gracefully #3751

merged 7 commits into from
Jun 29, 2023

Conversation

pavitthrap
Copy link
Contributor

@pavitthrap pavitthrap commented Jun 8, 2023

Description

Now, a copy of the bool should_keep_running, which manages system-wide shutdown, is owned by the BitcoinIndexer object.

In the function connect_handshake_backoff, this bool is now checked in every loop. The loop terminates if should_keep_running is false.

Applicable issues

Additional info (benefits, drawbacks, caveats)

Checklist

  • Test coverage for new or modified code paths
  • Changelog is updated

@pavitthrap pavitthrap requested review from kantai and obycode June 8, 2023 16:27
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Merging #3751 (a60d6fc) into develop (7a0e572) will decrease coverage by 0.91%.
The diff coverage is 90.54%.

@@             Coverage Diff             @@
##           develop    #3751      +/-   ##
===========================================
- Coverage    85.79%   84.88%   -0.91%     
===========================================
  Files          302      302              
  Lines       286529   286534       +5     
===========================================
- Hits        245830   243238    -2592     
- Misses       40699    43296    +2597     
Impacted Files Coverage Δ
src/chainstate/coordinator/mod.rs 87.00% <50.00%> (+1.63%) ⬆️
src/burnchains/bitcoin/network.rs 81.44% <80.00%> (-0.04%) ⬇️
testnet/stacks-node/src/tests/neon_integrations.rs 59.39% <83.33%> (-23.99%) ⬇️
src/burnchains/bitcoin/indexer.rs 36.31% <88.57%> (+0.41%) ⬆️
...-node/src/burnchains/bitcoin_regtest_controller.rs 86.85% <100.00%> (+0.04%) ⬆️
testnet/stacks-node/src/neon_node.rs 82.21% <100.00%> (-1.66%) ⬇️
testnet/stacks-node/src/node.rs 89.61% <100.00%> (+5.18%) ⬆️
testnet/stacks-node/src/run_loop/neon.rs 83.15% <100.00%> (-0.32%) ⬇️
testnet/stacks-node/src/tests/epoch_22.rs 71.97% <100.00%> (-24.20%) ⬇️
testnet/stacks-node/src/tests/epoch_23.rs 99.63% <100.00%> (+<0.01%) ⬆️
... and 1 more

... and 42 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pavitthrap pavitthrap changed the title Fix/shutdown bitcoind Fix/terminate node gracefully Jun 8, 2023
Copy link
Member

@kantai kantai left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM!

@pavitthrap pavitthrap merged commit 334136a into develop Jun 29, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants