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: fix TestTxHandlerAppRateLimiter #6075

Merged

Conversation

algorandskiy
Copy link
Contributor

Summary

As discovered in #5972 the TestTxHandlerAppRateLimiter had a typo.
This PR fixed it by crafting workload to make sure ARL in txHandler is getting actually called.

While debugging I noticed that maxBucketSize is set to 1 if TxBacklogAppTxRateLimiterMaxSize is less than 128 (number of buckets). Although this was not an issue in production due to TxBacklogAppTxRateLimiterMaxSize=1048576 it would trigger eviction on each insert that makes ARL noop. Setting maxBucketSize to 2 as its min value makes it working in such extreme configuration.

Test Plan

This is a test fix

Closes #5972

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.27%. Comparing base (75bb6a9) to head (fb7d825).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6075      +/-   ##
==========================================
- Coverage   56.29%   56.27%   -0.03%     
==========================================
  Files         488      488              
  Lines       69581    69581              
==========================================
- Hits        39172    39156      -16     
- Misses      27752    27764      +12     
- Partials     2657     2661       +4     

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

data/txHandler_test.go Outdated Show resolved Hide resolved
data/txHandler_test.go Show resolved Hide resolved
@algorandskiy algorandskiy requested a review from jasonpaulos July 24, 2024 14:57
@algorandskiy algorandskiy merged commit e52f91a into algorand:master Jul 26, 2024
18 checks passed
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.

Buggy test?
3 participants