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

   Follow-up on the open items from your second review and on the recheck of 
`f8072a24`, all in the latest push.
   
   Workflow identity: the action `_vid` is now derived from the rule's `case` 
and the action's plugin (a crc32 of both), and the position only tells apart 
rules that are otherwise identical, including rules without a `case`. 
Reordering, adding or removing rules keeps each counter with its action, 
editing a `case` starts a new one, and editing the limits keeps the count. 
`limit-count-conf-update.t` TEST 10 swaps two rules with different limits and 
then edits one `case`; it fails on `f8072a24`. The workflow page and the 
limit-count/limit-conn pages describe it.
   
   GraphQL cost model: `cost_strategy` and `score_factor` are now part of the 
counter identity, so changing either starts a new counter, the same way 
`time_window` does. `max_cost` and the other fields keep the count. 
`graphql-limit-count.t` TEST 31 covers both, and the plugin page documents it.
   
   Sliding window with a raised count: you're right that the rebase can't undo 
the cap on the previous window count. When the synced quota was computed with 
another limit on a sliding window, the node now syncs again with its own 
limiter instead of rebasing, so the allowance comes from the counts. TEST 11 
seeds 8 requests in the previous window and 1 in the current one, judges once 
at count 2, raises it to 10, and compares the reported remaining with the 
direct sliding-window calculation at that point of the window. The fixed-window 
rebase stays as it was.
   
   Fixed to sliding: the node-local accounting is now scoped to the window 
algorithm as well. TEST 12 is your regression: two fixed-window admissions 
pending and not yet in Redis, a switch to sliding, one more admission, then 
both timers drain into 2 in the fixed bucket and 1 in the sliding bucket.
   
   Credentials and seed order: the username is no longer part of that identity, 
and the cluster nodes and sentinels are sorted, so a credential rotation or a 
reordered seed list keeps the pending usage. TEST 13 leaves two admissions 
pending at a count of 2, switches to the ACL user `alice` on the same Redis, 
and the third request is rejected.
   
   Cleanup: each conf-update file now uses a route ID that includes a per-run 
suffix and deletes only keys that start with its plugin's storage prefix 
followed by that route. `limit-conn-conf-update.t` TEST 8 keeps your peer key 
`limit_conn:/apisix/routes/peer:client/apisix/routes/<route>:blue` and a 
sibling route's key live through the cleanup and checks that their exact 
members survive.
   
   Late release: TEST 9 holds a lease from before an update, admits a new one 
after it, and checks that the old request's release leaves exactly the new 
member, not just one member. I didn't add the two-worker check. The lease ID 
now lives on the limiter object of each reservation and nothing about it is per 
worker, so a second worker doesn't add a path this test misses.
   


-- 
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