Skip to content

Conversation

@algonautshant
Copy link
Contributor

@algonautshant algonautshant commented Nov 17, 2022

The txHandler and txSyncer are stopped when catching up from a catchpoint, and started again afterwards.

But they never really start. The main loop of these services rely on a context to stop. That context is canceled when stopping. Then, when the services are started again, the contexts remain canceled, which leads for the service to immediately end.

The fix is to create a new context when starting these services.

This PR fixes the txHandler part of #4775

@algonautshant algonautshant marked this pull request as ready for review November 17, 2022 16:05
brianolson
brianolson previously approved these changes Nov 17, 2022
Copy link
Contributor

@brianolson brianolson left a comment

Choose a reason for hiding this comment

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

this is a remarkably simple and straightforward fix. most of the work was on the test, eh? LGTM.

@codecov
Copy link

codecov bot commented Nov 17, 2022

Codecov Report

Merging #4809 (4290130) into master (e618fbf) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master    #4809   +/-   ##
=======================================
  Coverage   54.67%   54.68%           
=======================================
  Files         414      414           
  Lines       53550    53550           
=======================================
+ Hits        29278    29282    +4     
  Misses      21842    21842           
+ Partials     2430     2426    -4     
Impacted Files Coverage Δ
data/txHandler.go 25.18% <0.00%> (-0.75%) ⬇️
ledger/blockqueue.go 85.63% <0.00%> (-2.88%) ⬇️
catchup/peerSelector.go 98.95% <0.00%> (-1.05%) ⬇️
catchup/service.go 68.14% <0.00%> (-0.75%) ⬇️
ledger/acctupdates.go 69.26% <0.00%> (-0.49%) ⬇️
network/wsNetwork.go 65.34% <0.00%> (-0.19%) ⬇️
data/transactions/verify/txn.go 76.19% <0.00%> (ø)
ledger/tracker.go 74.89% <0.00%> (+0.85%) ⬆️
ledger/testing/randomAccounts.go 57.23% <0.00%> (+1.23%) ⬆️
agreement/proposalManager.go 98.03% <0.00%> (+1.96%) ⬆️
... and 2 more

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

brianolson
brianolson previously approved these changes Nov 17, 2022
Copy link
Contributor

@algorandskiy algorandskiy left a comment

Choose a reason for hiding this comment

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

The fix is good, please tweak the test a bit. Is it stable enough?

@algorandskiy algorandskiy changed the title Bug-fix: txhandler does not start after node catching up #4775 txhandler: service does not restart after node catching up Nov 18, 2022
@algorandskiy algorandskiy merged commit 6acbd18 into algorand:master Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants