membphis commented on PR #13443:
URL: https://github.com/apache/apisix/pull/13443#issuecomment-4645882658

   I think this needs a compatibility guard before merge.
   
   The Redis fixed-window counter format changes from “remaining quota” to 
“consumed count”, but the Redis key namespace appears to stay the same. 
Existing `policy=redis` / `redis-cluster` keys created before upgrade store 
`limit - cost` and then decrement with negative `INCRBY`; the new 
implementation stores `cost` and increments positively.
   
   During rolling upgrades, or until existing Redis keys expire, the new code 
can read old keys with the new meaning. That may temporarily over-limit or 
under-limit existing routes.
   
   Could we either use a new Redis key namespace/version for the new format, 
detect/migrate old-format keys safely, or document and enforce a migration 
strategy that avoids reusing the same keys across the format change?


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