membphis commented on code in PR #12514: URL: https://github.com/apache/apisix/pull/12514#discussion_r2281214810
########## apisix/core/config_etcd.lua: ########## @@ -190,6 +190,18 @@ local function do_run_watch(premature) opts.need_cancel = true opts.start_revision = watch_ctx.rev + -- get latest revision + local res, err = watch_ctx.cli:readdir(watch_ctx.prefix .. "/phantomkey") + if err then + log.error("failed to get latest revision, err: ", err) + end + local latest_rev + if res and res.body and res.body.header and res.body.header.revision then + latest_rev = tonumber(res.body.header.revision) + else + log.error("failed to get latest revision, res: ", inspect(res)) Review Comment: ```suggestion log.error("failed to get latest revision, res: ", core.json.delay_encode(res)) ``` -- 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. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org