nic-6443 commented on PR #13191:
URL: https://github.com/apache/apisix/pull/13191#issuecomment-4214855367

   Fixed the CI failure in TEST 13: when the expression evaluates to a negative 
value that gets clamped to 0, calling `rate_limit()` with `cost=0` triggers an 
assertion failure in `resty.limit.count`'s `incoming` function (`dict:incr(key, 
0, ...)`). The fix skips the `rate_limit()` call entirely when `used_tokens == 
0` since there's nothing to deduct.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to