-
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
refactor: add log after apisix.yml config reload in standalone mode #10404
Conversation
Fixes apache#10402 Please review. Not sure why is the log message printed multiple times and how to avoid it.
The error log will be flooded by you newly added message.
|
Hi @monkeyDluffy6017 local last_change_time = attributes.change
if apisix_yaml_ctime == last_change_time then
return
end Log statement is added at the end of the method, after successful execution. |
I don't think it's very necessary, we don't have this log when use etcd too, the number of logs is also very lagre even the log is printed when you send a new configuration |
This additional log entry won't much increase the log size, since it's applied only when config file changes, which is not very frequent, depending on the usage scenario. If we add it, the benefit would be that we can confirm when changes are applied successfully. As for the log verbosity, I created a new ticket that is not related to this topic, but for log entry duplication in general. See #10414 |
Some of our users change their configurations very frequently, like thousands of times in 1s |
In |
What I mean is that even in standalone mode, configuration changes are frequent and should not be logged every time a configuration change is made without an error. This information is meaningless to most users. If you think this is necessary, you can keep this change yourself. |
I will close this pr, feel free to reopen it |
I agree with @markokocic that when running apisix in standalone mode you don't get a lot of reloads; if ones needs that, they would use etcd or another config plane, not a static file. @monkeyDluffy6017: running apisix in standalone mode in a kubernetes pod, getting
|
Sounds reasonable. |
I agree with your point that static files usually do not change frequently. |
Fixes #10402
Please review. Not sure why is the log message printed multiple times and how to avoid it.
Checklist