You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/04 06:42:50 UTC
[GitHub] [apisix] wakaaa1234 opened a new pull request #2622: fix bug of attempt to compare number with string
wakaaa1234 opened a new pull request #2622:
URL: https://github.com/apache/apisix/pull/2622
### What this PR does / why we need it:
found a bug of compare number with string.
2020/11/1 11:14:47 [error] 20511#20511: *12449485 lua entry thread aborted: runtime error: /usr/local/apisix/apisix/plugins/prometheus/exporter.lua:181: attempt to compare number with string
stack traceback:
coroutine 0:
/usr/local/apisix/apisix/plugins/prometheus/exporter.lua: in function 'set_modify_index'
/usr/local/apisix/apisix/plugins/prometheus/exporter.lua:203: in function 'etcd_modify_index'
/usr/local/apisix/apisix/plugins/prometheus/exporter.lua:262: in function 'handler'
/usr/local/apisix/apisix/plugin.lua:209: in function 'handler'
/usr/local/apisix//deps/share/lua/5.1/resty/radixtree.lua:739: in function 'dispatch'
/usr/local/apisix/apisix/http/router/radixtree_uri.lua:110: in function 'match'
/usr/local/apisix/apisix/init.lua:336: in function 'http_access_phase'
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
### Pre-submission checklist:
* [ ] Did you explain what problem does this PR solve? Or what new features have been added?
* [ ] Have you added corresponding test cases?
* [ ] Have you modified the corresponding document?
* [ ] Is this PR backward compatible?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander closed pull request #2622: fix bug of attempt to compare number with string
Posted by GitBox <gi...@apache.org>.
spacewander closed pull request #2622:
URL: https://github.com/apache/apisix/pull/2622
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on pull request #2622: fix bug of attempt to compare number with string
Posted by GitBox <gi...@apache.org>.
spacewander commented on pull request #2622:
URL: https://github.com/apache/apisix/pull/2622#issuecomment-754318560
We don't accept PR to non-master branch. And this fix is contained in master branch yet.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] idbeta commented on pull request #2622: fix bug of attempt to compare number with string
Posted by GitBox <gi...@apache.org>.
idbeta commented on pull request #2622:
URL: https://github.com/apache/apisix/pull/2622#issuecomment-721616242
> Which version of APISIX you are using?
> The bug is expected fixed: #2394
```
commit into apache:v1.5 from wakaaa1234:patch-1
```
It seems that @wakaaa1234 wants to fix this bug in version 1.5.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on pull request #2622: fix bug of attempt to compare number with string
Posted by GitBox <gi...@apache.org>.
spacewander commented on pull request #2622:
URL: https://github.com/apache/apisix/pull/2622#issuecomment-721544592
Which version of APISIX you are using?
The bug is expected fixed: https://github.com/apache/apisix/issues/2394
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] membphis commented on a change in pull request #2622: fix bug of attempt to compare number with string
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #2622:
URL: https://github.com/apache/apisix/pull/2622#discussion_r517353340
##########
File path: apisix/plugins/prometheus/exporter.lua
##########
@@ -178,8 +178,13 @@ local function set_modify_index(key, items, items_ver, global_max_index)
local max_idx = 0
if items_ver and items then
for _, item in ipairs(items) do
- if type(item) == "table" and item.modifiedIndex > max_idx then
- max_idx = item.modifiedIndex
+ if type(item) == "table" then
Review comment:
that is the wrong way.
please take a look at the `2.0` or master branch.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] moonming commented on pull request #2622: fix bug of attempt to compare number with string
Posted by GitBox <gi...@apache.org>.
moonming commented on pull request #2622:
URL: https://github.com/apache/apisix/pull/2622#issuecomment-754301281
ping @wakaaa1234 @membphis
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org