This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 1ee7ead chore: remove stale access to modifiedIndex_org (#2825)
1ee7ead is described below
commit 1ee7ead1e64d64c4996608edbd56399bdbd5192d
Author: 罗泽轩 <[email protected]>
AuthorDate: Tue Nov 24 16:57:12 2020 +0800
chore: remove stale access to modifiedIndex_org (#2825)
Since c5dcced1cf90e2ffa5b73583784fc9bd34706aac,
modifiedIndex_org is only accessed in this place without any assignment.
---
apisix/plugins/prometheus/exporter.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apisix/plugins/prometheus/exporter.lua
b/apisix/plugins/prometheus/exporter.lua
index 3519199..45a79c5 100644
--- a/apisix/plugins/prometheus/exporter.lua
+++ b/apisix/plugins/prometheus/exporter.lua
@@ -207,7 +207,7 @@ local function set_modify_index(key, items, items_ver,
global_max_index)
if items_ver and items then
for _, item in ipairs(items) do
if type(item) == "table" then
- local modify_index = item.modifiedIndex_org or
item.modifiedIndex
+ local modify_index = item.modifiedIndex
if modify_index > max_idx then
max_idx = modify_index
end