membphis commented on code in PR #14244: URL: https://github.com/apache/apisix/pull/14244#discussion_r4661547862
########## apisix/utils/limit.lua: ########## @@ -0,0 +1,146 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +local core = require("apisix.core") +local jsonpath = require("jsonpath") +local ipairs = ipairs +local type = type +local rawget = rawget +local getmetatable = getmetatable +local setmetatable = setmetatable +local tostring = tostring +local crc32 = ngx.crc32_long +local parsed_paths = {} + +local _M = {} + +-- Connection credentials and tuning do not identify the counter's storage. +-- Keep this list shared by the three plugins instead of ignoring redis_*. +local backend_paths = { Review Comment: 不应当有这个数据(他们属于每个插件自己的定义) 核心库,不绑定任何插件个性行为 ########## apisix/plugins/limit-count/delayed-syncer.lua: ########## @@ -206,6 +211,22 @@ function _M._delayed_sync(self, key, cost, syncer_id) end remote_remaining, remote_reset, sync_at = quota.remaining, quota.reset, quota.sync_at + local rebase = quota.limit and quota.limit ~= self.limit + if rebase then Review Comment: if 中 的逻辑,是这次修改,联动发现的 旧 原有 bug 还是我们改造后引起的问题? 如果是前者,推荐在另外 PR 中,单独修复,不要混在当前 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]
