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

Add warn logs for receiving null properties #1004

Merged
merged 2 commits into from
Jun 14, 2024
Merged

Add warn logs for receiving null properties #1004

merged 2 commits into from
Jun 14, 2024

Conversation

bohhyang
Copy link
Contributor

@bohhyang bohhyang commented Jun 14, 2024

Summary

As the title. Add these logs for detecting potential issues and debugging. If the null guard in property event bus works as expected and xDS server sends valid data, these logs should NEVER appear (except the harmless one in FileStore).

Test Done

unit tests

@@ -77,6 +77,7 @@ protected void handlePut(final String listenTo, final ClusterProperties discover
}
else
{
_log.warn("Received a null cluster properties for {}", listenTo);
Copy link
Member

Choose a reason for hiding this comment

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

Last time we added logs around, they ended up being very noisy. Can you double check this isn't the case for this logger?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this log should not be logged unless there is a bug. And if there is a bug, we would want to see this log and take actions. So I think this log should be a must-show. I can make it an error instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess the Uri one could use a rate limiter in case of huge clusters having many uris. The service and cluster data won't change frequently anyway.

Copy link
Member

Choose a reason for hiding this comment

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

A rate limit seems like a good idea. I agree we want to fail loudly, but we don't want to fail so loudly it breaks people's logs to the point where we're scrambling to put in a fix! This has happened a few times already

@bohhyang bohhyang merged commit 8305f5e into master Jun 14, 2024
2 checks passed
@bohhyang bohhyang deleted the by/nullLog branch June 14, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants