membphis commented on code in PR #14244:
URL: https://github.com/apache/apisix/pull/14244#discussion_r4661427613
##########
apisix/plugins/limit-count/init.lua:
##########
@@ -376,7 +377,10 @@ local function gen_limit_key(conf, ctx, key)
local prefix = limit_key_prefix[conf]
if not prefix then
- prefix = parent.resource_key .. ':' ..
apisix_plugin.conf_version(conf) .. ':'
+ -- Derived configurations (AI, GraphQL and workflow) retain their own
+ -- existing identity until their callers opt into prepared buckets.
+ local bucket_id = limit_util.get_bucket_id(conf) or
apisix_plugin.conf_version(conf)
Review Comment:
Is the `or` fallback still necessary here?
##########
apisix/plugins/limit-count/delayed-syncer.lua:
##########
@@ -388,11 +410,11 @@ local function sync_key(self, key)
core.log.error("sync to fallback_limiter failed: ",
remaining_or_err, ", key: ", key)
else
- self:sync_to_shm(key, 0, reset, delta, info)
+ self:sync_to_shm(key, rejected_remaining(self, info),
reset, delta, info)
Review Comment:
Why does `rejected_remaining` need to change?
Is this related to the bug fix in this PR?
##########
apisix/plugins/limit-count/delayed-syncer.lua:
##########
@@ -98,9 +98,25 @@ function _M.key_remote_quota(self, key)
end
+-- Preserve over-limit debt so raising the limit does not grant it twice.
Review Comment:
Are you sure this is related to the bug fix in this PR?
##########
apisix/plugins/limit-conn/util.lua:
##########
@@ -39,7 +39,12 @@ local redis_incoming_script = core.string.compress_script([=[
end
redis.call('ZADD', key, now + ttl, req_id)
- redis.call('EXPIRE', key, ttl)
+ -- Existing leases may have been admitted with a longer key_ttl.
Review Comment:
Is this change related to the bug fix in this PR?
--
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]