-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: etcd compact err【do not merge me! only for discussion】 #11149
fix: etcd compact err【do not merge me! only for discussion】 #11149
Conversation
if not dir_res then | ||
if err == "compacted" then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't remove these codes, we should keep them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
@nic-chen Readded the error handling for compact err |
apisix/core/config_etcd.lua
Outdated
log.info("updating prev_index from "..self.prev_index.." to "..rev ) | ||
if rev then | ||
if rev == self.prev_index then | ||
goto fail | ||
end | ||
self.prev_index = rev | ||
end | ||
goto waitdir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about the change?
log.info("updating prev_index from "..self.prev_index.." to "..rev ) | |
if rev then | |
if rev == self.prev_index then | |
goto fail | |
end | |
self.prev_index = rev | |
end | |
goto waitdir | |
log.info("updating prev_index from "..self.prev_index.." to "..rev ) | |
self:upgrade_version(rev) |
apisix/core/config_etcd.lua
Outdated
if err == "compacted" then | ||
self.need_reload = true | ||
log.warn("waitdir [", self.key, "] err: ", err, | ||
", will read the configuration again via readdir") | ||
return false | ||
goto fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need to change the workflow
Description
Fixes # (issue)
Checklist