Skip to content

Commit 93c4486

Browse files
committed
f
Signed-off-by: Nic <qianyong@api7.ai>
1 parent b587597 commit 93c4486

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

apisix/plugin.lua

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ function _M.set_plugins_meta_parent(plugins, parent)
12671267
end
12681268

12691269

1270-
local function merge_global_rules(global_rules)
1270+
local function merge_global_rules(global_rules, conf_version)
12711271
-- First pass: identify duplicate plugins across all global rules
12721272
local plugins_hash = {}
12731273
local seen_plugin = {}
@@ -1288,8 +1288,6 @@ local function merge_global_rules(global_rules)
12881288
end
12891289
end
12901290

1291-
local createdIndex = 1
1292-
local modifiedIndex = 1
12931291
local dummy_global_rule = {
12941292
key = "/apisix/global_rules/dummy",
12951293
value = {
@@ -1298,8 +1296,8 @@ local function merge_global_rules(global_rules)
12981296
created_time = ngx.time(),
12991297
id = 1,
13001298
},
1301-
createdIndex = createdIndex,
1302-
modifiedIndex = modifiedIndex,
1299+
createdIndex = conf_version,
1300+
modifiedIndex = conf_version,
13031301
clean_handlers = {},
13041302
}
13051303

@@ -1320,7 +1318,8 @@ function _M.run_global_rules(api_ctx, global_rules, conf_version, phase_name)
13201318
local dummy_global_rule = merge_global_rule_lrucache(conf_version,
13211319
global_rules,
13221320
merge_global_rules,
1323-
global_rules)
1321+
global_rules,
1322+
conf_version)
13241323

13251324
local plugins = core.tablepool.fetch("plugins", 32, 0)
13261325
local route = api_ctx.matched_route

0 commit comments

Comments
 (0)