Skip to content

fix(limit-count): avoid double-counting delta after quota refresh - #13950

Open
nic-6443 wants to merge 1 commit into
apache:masterfrom
nic-6443:fix/delayed-sync-quota-refresh-20260915
Open

nic-6443 wants to merge 1 commit into
apache:masterfrom
nic-6443:fix/delayed-sync-quota-refresh-20260915

Conversation

@nic-6443

Copy link
Copy Markdown
Member

When delayed Redis synchronization refreshes an expired or missing cached quota, it flushes pending local requests to Redis and subtracts the same delta again while evaluating the current request. This can reject a request with quota still available and accept the next request.

Clear the request's local delta after a successful shared-memory refresh. Add Redis regression coverage for fixed and sliding windows, including expired and missing caches, and document the refresh behavior in English and Chinese.

  • Explained the problem and the change.
  • Added regression tests covering admission and the final Redis count.
  • Updated the documentation.
  • Preserved configuration and storage compatibility.

Copilot AI lite review requested due to automatic review settings September 15, 2026 09:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants