Skip to content

bug: when delete a route , it will trigger an exception #8492

Description

@jobop

Current Behavior

When a key is deleted,and the key versions is compacted ,it will occur this exception

2022/12/01 00:02:57 [error] 306#306: *13511386 [lua] config_etcd.lua:595: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
stack traceback:
/usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
/usr/local/apisix/apisix/core/config_etcd.lua:318: in function 'sync_data'
/usr/local/apisix/apisix/core/config_etcd.lua:548: in function </usr/local/apisix/apisix/core/config_etcd.lua:538>
[C]: in function 'xpcall'
/usr/local/apisix/apisix/core/config_etcd.lua:538: in function </usr/local/apisix/apisix/core/config_etcd.lua:516>, etcd key: /apisix/routes, context: ngx.timer

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

1、Turn on the etcd auto compact optim
2、Remove a route
3、Wait uitl the compacting mechanism is triggered

Environment

  • APISIX version (run apisix version):3.0.0
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):3.4.16
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions