nic-chen commented on code in PR #12015: URL: https://github.com/apache/apisix/pull/12015#discussion_r1980511205
########## apisix/core/config_etcd.lua: ########## @@ -262,9 +262,15 @@ local function do_run_watch(premature) cancel_watch(http_cli) break end - if rev > watch_ctx.rev then - watch_ctx.rev = rev + 1 + + if rev < watch_ctx.rev then + log.error("received smaller revision, rev=", rev, ", watch_ctx.rev=", + watch_ctx.rev,". etcd may be restarted. resyncing....") + produce_res(nil, "restarted") + cancel_watch(http_cli) + break end + watch_ctx.rev = rev + 1 Review Comment: what will happen when `rev == watch_ctx.rev` ? -- 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