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

chore(internal/trie/node): remove all mutexes #2301

Merged
merged 1 commit into from
Feb 23, 2022

Conversation

qdm12
Copy link
Contributor

@qdm12 qdm12 commented Feb 16, 2022

Changes

  • Remove leaf's encodingMu since it was a temporary fix I forgot to remove in fix(trie): memory leak fix in lib/trie #2009 as far as I recall
  • Remove leaf and branch rw mutex since it's not needed (all code is pretty much synchronous and called synchronously through mutexes etc.)

Tests

go test -count 1 -race ./internal/trie/... ./lib/trie/...

Issues

Done to test a comment after discussion with sigmap on Slack

Primary Reviewer

@codecov
Copy link

codecov bot commented Feb 16, 2022

Codecov Report

Merging #2301 (c87c07a) into development (63303a3) will decrease coverage by 0.10%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #2301      +/-   ##
===============================================
- Coverage        57.37%   57.27%   -0.11%     
===============================================
  Files              211      211              
  Lines            27759    27736      -23     
===============================================
- Hits             15927    15885      -42     
- Misses           10202    10218      +16     
- Partials          1630     1633       +3     
Flag Coverage Δ
unit-tests 57.27% <ø> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/trie/node/branch.go 100.00% <ø> (ø)
internal/trie/node/copy.go 100.00% <ø> (ø)
internal/trie/node/hash.go 84.21% <ø> (-1.51%) ⬇️
internal/trie/node/leaf.go 100.00% <ø> (ø)
internal/trie/node/leaf_encode.go 78.57% <ø> (-1.70%) ⬇️
lib/blocktree/node.go 65.98% <0.00%> (-6.81%) ⬇️
lib/blocktree/blocktree.go 54.87% <0.00%> (-1.09%) ⬇️
dot/network/service.go 55.88% <0.00%> (-0.91%) ⬇️
dot/network/light.go 85.25% <0.00%> (-0.80%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63303a3...c87c07a. Read the comment docs.

@qdm12 qdm12 merged commit dc62695 into development Feb 23, 2022
@qdm12 qdm12 deleted the qdm12-trie-node-nomutex branch February 23, 2022 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants