spacewander commented on a change in pull request #3003:
URL: https://github.com/apache/apisix/pull/3003#discussion_r539163635



##########
File path: apisix/core/etcd.lua
##########
@@ -269,12 +269,15 @@ end
 
 
 function _M.push(key, value, ttl)
-    local etcd_cli, prefix, err = new()
+    local etcd_cli, _, err = new()
     if not etcd_cli then
         return nil, err
     end
 
-    local res, err = etcd_cli:readdir(prefix .. key)
+    -- It will be better if we use snowflake algorithm like manager-api,
+    -- but we haven't found a good library. It costs too much to write
+    -- our own one as the admin-api will be replaced by manager-api finally.
+    local res, err = set("/gen_id", 1)

Review comment:
       Updated.




----------------------------------------------------------------
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:
[email protected]


Reply via email to