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

fix: track promise only after a successful sendRpc() #415

Merged
merged 3 commits into from
Mar 23, 2023

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Mar 16, 2023

Motivation

  • In rare case, a sendRpc() call may be failed or got delayed, we should only track promise after a successful sendRpc

part of #413

@twoeths twoeths requested a review from a team as a code owner March 16, 2023 02:49
@what-the-diff
Copy link

what-the-diff bot commented Mar 16, 2023

  • Add a new variable sent to store the result of sendRpc()
  • If iwantMessageIds is not undefined, add promise for this peer id and message ids in gossipTracer

@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2023

Codecov Report

Patch coverage: 7.14% and project coverage change: -0.07 ⚠️

Comparison is base (1e1cf5a) 83.31% compared to head (e07d38a) 83.24%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #415      +/-   ##
==========================================
- Coverage   83.31%   83.24%   -0.07%     
==========================================
  Files          48       48              
  Lines       11800    11812      +12     
  Branches     1271     1272       +1     
==========================================
+ Hits         9831     9833       +2     
- Misses       1969     1979      +10     
Impacted Files Coverage Δ
src/metrics.ts 21.13% <0.00%> (-0.12%) ⬇️
src/index.ts 70.34% <10.00%> (-0.13%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@twoeths
Copy link
Contributor Author

twoeths commented Mar 16, 2023

after 3.5h, there are more than 2k untracked promise due to unsuccessful sendRpc() call in a mainnet node with only Nimbus peers

Screenshot 2023-03-16 at 16 39 37

src/index.ts Outdated Show resolved Hide resolved
@wemeetagain wemeetagain merged commit a959b09 into master Mar 23, 2023
@wemeetagain wemeetagain deleted the tuyen/add_promise_after_sendRpc branch March 23, 2023 14:35
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