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

Remove mutex use in interceptor #4407

Merged
merged 2 commits into from
Aug 31, 2022

Conversation

iulianpascalau
Copy link
Contributor

@iulianpascalau iulianpascalau commented Aug 30, 2022

Description of the reasoning behind the pull request (what feature was missing / how the problem was manifesting itself / what was the motive behind the refactoring)

  • there was a bug in the SingleDataInterceptor that caused a mutex to be held for too much time. The mutex involved is mutDebugHandler that protects the debugHandler resource and is correctly used in the baseDataInterceptor common struct. The extra usage in SingleDataInterceptor remained from the last refactor that was carried ~2 years ago.

Proposed Changes

  • remove the extra usage of the mutex in the SingleDataInterceptor

Testing procedure

  • standard testing procedure

@codecov-commenter
Copy link

Codecov Report

Merging #4407 (48de2a3) into rc/2022-july (7d3761c) will increase coverage by 0.04%.
The diff coverage is n/a.

@@               Coverage Diff                @@
##           rc/2022-july    #4407      +/-   ##
================================================
+ Coverage         73.87%   73.91%   +0.04%     
================================================
  Files               677      677              
  Lines             86864    86862       -2     
================================================
+ Hits              64173    64208      +35     
+ Misses            17895    17860      -35     
+ Partials           4796     4794       -2     
Impacted Files Coverage Δ
process/interceptors/singleDataInterceptor.go 97.61% <ø> (-0.06%) ⬇️
...t/processor/peerAuthenticationRequestsProcessor.go 96.80% <0.00%> (+2.39%) ⬆️
storage/txcache/txListBySenderMap.go 100.00% <0.00%> (+2.50%) ⬆️
common/pidQueue.go 96.66% <0.00%> (+3.33%) ⬆️
p2p/libp2p/netMessenger.go 80.02% <0.00%> (+3.91%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

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

System test passed.

@gabi-vuls gabi-vuls merged commit 8683eb6 into rc/2022-july Aug 31, 2022
@gabi-vuls gabi-vuls deleted the remove-mutex-use-in-interceptor branch August 31, 2022 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants