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

txHandler: do not drop accepted mgs #6257

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

algorandskiy
Copy link
Contributor

@algorandskiy algorandskiy commented Feb 15, 2025

Summary

The (!isCMEnabled && congestedERL) condition in incomingMsgErlCheck added at some point to relief the spam congestion has the following side effect when:

  1. per-peer reserved queue in ERL get exhausted
  2. ERL's congestion manager (isCMEnabled) not enabled yet (it will be after the current ConsumeCapacity invocation)
  3. shared capacity in ConsumeCapacity was successfully consumed

In this case the condition (!isCMEnabled && congestedERL) triggers congestion control to be enabled and dropping this message. In the same time consecutive messages would come through because isCMEnabled is set and erl.cm.ShouldDrop(c) might allow it due to messages rate.

Fixed by enabling congestion control but accepting the message if (!isCMEnabled && congestedERL) is met.

Note to reviewers:

This fix came out from ERL work and is is also integrated into the ERL change #6176

Test Plan

Rely on existing tests

@algorandskiy algorandskiy requested review from cce and gmalouf February 15, 2025 01:05
@algorandskiy algorandskiy self-assigned this Feb 15, 2025
Copy link

codecov bot commented Feb 15, 2025

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 51.77%. Comparing base (8fce49c) to head (2805a8d).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
data/txHandler.go 0.00% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6257      +/-   ##
==========================================
- Coverage   51.79%   51.77%   -0.02%     
==========================================
  Files         644      644              
  Lines       86511    86512       +1     
==========================================
- Hits        44805    44794      -11     
- Misses      38834    38846      +12     
  Partials     2872     2872              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@algorandskiy algorandskiy marked this pull request as ready for review February 15, 2025 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants