Skip to content
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

chore(clustering/db): reduce log flooding on clustering and schema validation #11124

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

bungle
Copy link
Member

@bungle bungle commented Jun 26, 2023

Summary

On control plane there was a debug log written on every second on every worker that had no connected clients. This will now only log it once per worker, until number of connected clients changes.

The schema validation also had a thing called unvalidated fields that caused huge amounts of logs to be written with large config import / validation. (I didn't count but with my example config I got thousands, perhaps tens of thousands of log lines on same second with exactly same uninformal message 2023/06/26 20:08:36 [debug] 72011#0: *10 [kong] init.lua:1121 ignoring validation on updated_at field).

…lidation

### Summary

On control plane there was a debug log written on every second on every worker
that had no connected clients. This will now only log it once per worker, until
number of connected clients changes.

The schema validation also had a thing called unvalidated fields that caused
huge amounts of logs to be written with large config import / validation.

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
kong.log.debug("ignoring validation on ", k, " field")
else

elseif not self.unvalidated_fields[k]() then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the logs for the unvalidated fields don't seem that useful at present.

@bungle bungle merged commit 3a86621 into master Jun 27, 2023
22 checks passed
@bungle bungle deleted the chore/log-flooding branch June 27, 2023 08:01
bungle added a commit that referenced this pull request Jun 27, 2023
…goto"

### Summary

Follow-up from #11124 to slightly clean
the code.

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
bungle added a commit that referenced this pull request Jun 27, 2023
…goto" (#11128)

### Summary

Follow-up from #11124 to slightly clean
the code.

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants