-
Notifications
You must be signed in to change notification settings - Fork 200
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 concurrent map access error when tracing blocks #1822
Conversation
The logging from these tests slowed them down and cluttered the output of test runs.
Ensure state.StateDB instances are not accessed concurrently.
Coverage from tests in coverage: 51.8% of statements across all listed packagescoverage: 65.2% of statements in consensus/istanbul coverage: 43.1% of statements in consensus/istanbul/announce coverage: 56.0% of statements in consensus/istanbul/backend coverage: 0.0% of statements in consensus/istanbul/backend/backendtest coverage: 24.3% of statements in consensus/istanbul/backend/internal/replica coverage: 70.6% of statements in consensus/istanbul/core coverage: 50.0% of statements in consensus/istanbul/db coverage: 0.0% of statements in consensus/istanbul/proxy coverage: 75.3% of statements in consensus/istanbul/uptime coverage: 100.0% of statements in consensus/istanbul/uptime/store coverage: 51.8% of statements in consensus/istanbul/validator coverage: 79.2% of statements in consensus/istanbul/validator/randomCommentID: 13240928d1 |
Codecov Report
@@ Coverage Diff @@
## master #1822 +/- ##
==========================================
- Coverage 54.24% 54.21% -0.03%
==========================================
Files 673 673
Lines 88989 88991 +2
==========================================
- Hits 48269 48245 -24
- Misses 37079 37106 +27
+ Partials 3641 3640 -1
Continue to review full report at Codecov.
|
Fixes #1799 This commit ensures that state.StateDB instances are not accessed concurrently when tracing blocks and also adds an e2e test to verify the fix. It also disables logging from the e2e tests, because the logs slowed the tests down and cluttered the output of test runs. It also updates test node instances to ensure that all rpc api modules are enabled.
Fixes #1799 This commit ensures that state.StateDB instances are not accessed concurrently when tracing blocks and also adds an e2e test to verify the fix. It also disables logging from the e2e tests, because the logs slowed the tests down and cluttered the output of test runs. It also updates test node instances to ensure that all rpc api modules are enabled.
Description
This PR fixes the concurrent map access error in the ticket linked below.
The problem was that
state.StateDB
instances were being accessed from multiple go-routines, and they are not safe for concurrent use.Tested
Added an e2e test to ensure that the fix is working.
Related issues