iotex-core icon indicating copy to clipboard operation
iotex-core copied to clipboard

fix datarace in blocksync SyncStatus() and the new blocksync design

Open millken opened this issue 2 years ago • 2 comments

Description

fix SyncStatus() datarace, the blocksync(v2) speed-up 4x

Fixes #3889

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [] make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

millken avatar Jun 19 '23 07:06 millken

Codecov Report

Merging #3890 (2932389) into master (e1f0636) will increase coverage by 0.86%. The diff coverage is 75.23%.

:exclamation: Current head 2932389 differs from pull request most recent head 7d3799f. Consider uploading reports for the commit 7d3799f to get more accurate results

@@            Coverage Diff             @@
##           master    #3890      +/-   ##
==========================================
+ Coverage   75.38%   76.24%   +0.86%     
==========================================
  Files         303      326      +23     
  Lines       25923    27818    +1895     
==========================================
+ Hits        19541    21210    +1669     
- Misses       5360     5516     +156     
- Partials     1022     1092      +70     
Impacted Files Coverage Δ
action/protocol/execution/evm/evm.go 43.52% <0.00%> (-2.95%) :arrow_down:
action/protocol/execution/evm/evmstatedbadapter.go 66.77% <ø> (ø)
action/protocol/poll/consortium.go 0.00% <0.00%> (ø)
action/protocol/poll/staking_committee.go 43.85% <0.00%> (ø)
...tion/protocol/staking/contractstake_bucket_type.go 0.00% <0.00%> (ø)
api/grpcserver.go 86.40% <0.00%> (ø)
api/loglistener.go 25.00% <0.00%> (ø)
api/web3server_marshal.go 93.21% <ø> (ø)
api/websocket.go 5.17% <0.00%> (ø)
blockchain/config.go 74.54% <ø> (ø)
... and 51 more

... and 4 files with indirect coverage changes

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

codecov[bot] avatar Jun 19 '23 07:06 codecov[bot]

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Jul 20 '23 00:07 sonarqubecloud[bot]

Close b/c it has been inactive for 1+yr.

raullenchai avatar May 30 '24 20:05 raullenchai