membphis commented on code in PR #14244:
URL: https://github.com/apache/apisix/pull/14244#discussion_r4661429527
##########
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:
为什么要修改 rejected_remaining ?原因是什么?
是否与本次提交的 bugfix 有关?
##########
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:
确定与本次 bugfix 有关?
##########
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:
与本次 bugfix 主题有关?
##########
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:
这个 or 不需要了?
--
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]