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

Jsonrpc fix race conditions #908

Merged
merged 6 commits into from
Nov 16, 2022
Merged

Jsonrpc fix race conditions #908

merged 6 commits into from
Nov 16, 2022

Conversation

ferranbt
Copy link
Contributor

@ferranbt ferranbt commented Nov 15, 2022

Description

This PR fixes two race conditions in jsonrpc and one mutex lock. You can check the commits for each specific change.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

Please complete this section if you ran manual tests for this functionality, otherwise delete it

Documentation update

Please link the documentation update PR in this section if it's present, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

@codecov
Copy link

codecov bot commented Nov 15, 2022

Codecov Report

Merging #908 (f7a4aa6) into develop (62d5981) will decrease coverage by 0.02%.
The diff coverage is 94.87%.

@@             Coverage Diff             @@
##           develop     #908      +/-   ##
===========================================
- Coverage    52.80%   52.77%   -0.03%     
===========================================
  Files          128      129       +1     
  Lines        17148    17153       +5     
===========================================
- Hits          9055     9053       -2     
- Misses        7444     7453       +9     
+ Partials       649      647       -2     
Impacted Files Coverage Δ
jsonrpc/filter_manager.go 77.57% <94.87%> (+0.17%) ⬆️
state/state.go 35.29% <0.00%> (-15.87%) ⬇️
state/immutable-trie/state.go 50.81% <0.00%> (-2.89%) ⬇️
state/txn.go 17.12% <0.00%> (-2.64%) ⬇️
syncer/client.go 61.79% <0.00%> (-1.42%) ⬇️
state/immutable-trie/snapshot.go 58.33% <0.00%> (ø)
state/executor.go 3.96% <0.00%> (+0.07%) ⬆️
state/immutable-trie/trie.go 61.44% <0.00%> (+0.20%) ⬆️
network/server_discovery.go 76.39% <0.00%> (+1.86%) ⬆️

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

jsonrpc/filter_manager.go Show resolved Hide resolved
jsonrpc/filter_manager.go Outdated Show resolved Hide resolved
@ferranbt ferranbt self-assigned this Nov 15, 2022
@ferranbt ferranbt added the hotfix Major bug fix that should be merged ASAP label Nov 15, 2022
Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

LGTM aside from the suggestions

Copy link
Collaborator

@Stefan-Ethernal Stefan-Ethernal left a comment

Choose a reason for hiding this comment

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

LGTM

jsonrpc/filter_manager.go Outdated Show resolved Hide resolved
@ferranbt ferranbt merged commit c1ffc39 into develop Nov 16, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2022
@vcastellm vcastellm deleted the jsonrpc-fix-race-conditions branch November 16, 2022 09:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hotfix Major bug fix that should be merged ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants