Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug:config_etcd did not handle the watcher be canceled #2680

Closed
linxinshuo opened this issue Nov 10, 2020 · 0 comments · Fixed by #2687
Closed

bug:config_etcd did not handle the watcher be canceled #2680

linxinshuo opened this issue Nov 10, 2020 · 0 comments · Fixed by #2687
Assignees
Labels
bug Something isn't working

Comments

@linxinshuo
Copy link

Issue description

Current version, the config_etcd watch different prefixes and maintain revisions separately, when some prefix be modified, the others can not perceive revision change. If etcd enable auto compacted, the watcher with old revision will be canceled because revision be compacted.
hope the watcher can handle the canceled result, re-pull the latest revision and re-watch

In current version(2.0), canceled response will case panic
2020/11/10 10:23:25 [error] 46#0: *16354 [lua] config_etcd.lua:448: failed to fetch data from etcd:

/usr/local/apisix/apisix/core/etcd.lua:115: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
[C]: in function 'ipairs'
/usr/local/apisix/apisix/core/etcd.lua:115: in function 'waitdir'
/usr/local/apisix/apisix/core/config_etcd.lua:255: in function 'sync_data'
/usr/local/apisix/apisix/core/config_etcd.lua:424: in function </usr/local/apisix/apisix/core/config_etcd.lua:414>
[C]: in function 'xpcall'
/usr/local/apisix/apisix/core/config_etcd.lua:414: in function </usr/local/apisix/apisix/core/config_etcd.lua:405>, etcd key: /apisix/plugin_metadata, context: ngx.timer

Environment

  • apisix version (cmd: apisix version): 2.0
  • OS:
@spacewander spacewander added the bug Something isn't working label Nov 10, 2020
@spacewander spacewander self-assigned this Nov 10, 2020
spacewander added a commit to spacewander/incubator-apisix that referenced this issue Nov 10, 2020
spacewander added a commit to spacewander/incubator-apisix that referenced this issue Nov 11, 2020
membphis pushed a commit that referenced this issue Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants