-
Notifications
You must be signed in to change notification settings - Fork 471
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
txnsync: fix potential race during TestBasicCatchpointCatchup #3033
txnsync: fix potential race during TestBasicCatchpointCatchup #3033
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3033 +/- ##
==========================================
- Coverage 43.65% 43.63% -0.02%
==========================================
Files 391 391
Lines 86764 86764
==========================================
- Hits 37875 37861 -14
- Misses 42861 42873 +12
- Partials 6028 6030 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
## Summary During fast catchup, we restart the transaction sync service very quickly. This can cause a network message being sent, and the response would be returned to the "restarted" txnsync. Since we don't want to disconnect the network connection itself ( which could have some messages enqueued ), the transaction sync would need to store the "returned" channel before sending the message. That would avoid the data race ( and safely ignore the incoming message ). ## Test Plan Use existing testing, and confirm against that.
…algorand#3033)" This reverts commit 8568442.
Summary
During fast catchup, we restart the transaction sync service very quickly.
This can cause a network message being sent, and the response would be returned to the "restarted" txnsync.
Since we don't want to disconnect the network connection itself ( which could have some messages enqueued ), the transaction sync would need to store the "returned" channel before sending the message. That would avoid the data race ( and safely ignore the incoming message ).
Test Plan
Use existing testing, and confirm against that.