Skip to content

txHandler: fix TestTxHandlerAppRateLimiter#6075

Merged
algorandskiy merged 3 commits into
algorand:masterfrom
algorandskiy:pavel/tx-handler-arl-test-fix
Jul 26, 2024
Merged

txHandler: fix TestTxHandlerAppRateLimiter#6075
algorandskiy merged 3 commits into
algorand:masterfrom
algorandskiy:pavel/tx-handler-arl-test-fix

Conversation

@algorandskiy
Copy link
Copy Markdown
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

@codecov
Copy link
Copy Markdown

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.

Comment thread data/txHandler_test.go Outdated
Comment thread data/txHandler_test.go
@algorandskiy algorandskiy requested a review from jasonpaulos July 24, 2024 14:57
@algorandskiy algorandskiy merged commit e52f91a into algorand:master Jul 26, 2024
@algorandskiy algorandskiy deleted the pavel/tx-handler-arl-test-fix branch March 16, 2026 20:06
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