-
Notifications
You must be signed in to change notification settings - Fork 902
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
Disable annoying logs when segments is empty #4048
Conversation
I am not familiar with this part. Please correct me If I do something wrong. :) |
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.
LGTM
@@ -1014,6 +1014,9 @@ public void onSegmentsUpdated(List<LogSegmentMetadata> segments) { | |||
if (!started.get()) { | |||
return; | |||
} | |||
if (segments == null || segments.isEmpty()) { | |||
return; | |||
} | |||
logger.info("segments is updated with {}", segments); | |||
processLogSegments(segments); |
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.
If we returned when the segments is empty, it will skip call processLogSegments(segments);
, and I'm not sure what's the impact
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.
processLogSegments seems to do nothing in case of empty segments List
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.
LGTM
re-triggering CI by close/open |
Motivation
I saw some logs print repeatedly.
Changes
Return directly when segments are empty.