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 2021/04/10 14:52:34 UTC

[GitHub] [apisix] zyue27 opened a new issue #4021: bug: delete entries directly from etcd,somthing wrong happened

zyue27 opened a new issue #4021:
URL: https://github.com/apache/apisix/issues/4021


   ### Issue description
   
   ### Environment
   
   * apisix version (cmd: `apisix version`):  2.4
   * OS (cmd: `uname -a`): linux
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): 1.19.3.1
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): 3.4.0
   * apisix-dashboard version, if have:
   
   ### Minimal test code / Steps to reproduce the issue
   
   1.直接从etcd删除路由文件夹
   ![image](https://user-images.githubusercontent.com/42901890/114273880-86863100-9a4e-11eb-9fcd-b52f1a484dee.png)
   
   2.重新调用api添加路由后,通过api查询路由列表,查询结果始终只有一条结果,且结构不对
   
   ![image](https://user-images.githubusercontent.com/42901890/114274044-39ef2580-9a4f-11eb-8dbe-47fb6f77934e.png)
   
   3.重启apisix后恢复正常
   
   
   


-- 
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 edited a comment on issue #4021: bug: delete entries directly from etcd,somthing wrong happened

Posted by GitBox <gi...@apache.org>.
spacewander edited a comment on issue #4021:
URL: https://github.com/apache/apisix/issues/4021#issuecomment-817156351


   First of all, don't operate on etcd directly. As APISIX has some references between different directories. Such an operation may corrupt the data.
   
   Secondly, APISIX uses some placeholders to build the structure of data. If you remove the directory directly, they will be removed too. So the returned result is incorrect.
   
   This placeholder will be reinitialized during APISIX starts, so everything works well again after you restart it.
   
   See https://github.com/apache/apisix/blob/e295ebb9e811e505f0c9f6b604dd6a7b25bb0a74/apisix/cli/etcd.lua#L265-L283


-- 
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 edited a comment on issue #4021: bug: delete entries directly from etcd,somthing wrong happened

Posted by GitBox <gi...@apache.org>.
spacewander edited a comment on issue #4021:
URL: https://github.com/apache/apisix/issues/4021#issuecomment-817156351


   First of all, don't operate on etcd directly. As APISIX has some references between different directories. Such an operation may corrupt the data.
   
   Secondly, APISIX uses some placeholders to build the structure of data. If you remove the directory directly, they will be removed too.
   
   This placeholder will be reinitialized during APISIX starts, so everything works well again after you restart it.
   
   See https://github.com/apache/apisix/blob/e295ebb9e811e505f0c9f6b604dd6a7b25bb0a74/apisix/cli/etcd.lua#L265-L283


-- 
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 issue #4021: bug: delete entries directly from etcd,somthing wrong happened

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #4021:
URL: https://github.com/apache/apisix/issues/4021


   


-- 
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 issue #4021: bug: delete entries directly from etcd,somthing wrong happened

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4021:
URL: https://github.com/apache/apisix/issues/4021#issuecomment-817156351


   First of all, don't operate on etcd directly. As APISIX has some references between different directories. Such an operation may corrupt the data.
   
   Secondly, APISIX uses some placeholders to build the structure of data. If you remove the directory directly, they will be removed too.
   
   This placeholder will be reinitialized during APISIX starts, so everything works well gain after you restart it.
   
   See https://github.com/apache/apisix/blob/e295ebb9e811e505f0c9f6b604dd6a7b25bb0a74/apisix/cli/etcd.lua#L265-L283


-- 
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