-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cleanup: Fix grammar in error message, also improve readability. #13451
Conversation
mayankshriv
commented
Jun 20, 2024
- Fixed grammar.
- Now logging table name first, before the list of segments, for better readability.
dd847fd
to
822afe5
Compare
@@ -243,7 +243,7 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S | |||
Set<String> unavailableSegments = entry.getValue(); | |||
numUnavailableSegments += unavailableSegments.size(); | |||
brokerResponse.addException(QueryException.getException(QueryException.SERVER_SEGMENT_MISSING_ERROR, | |||
String.format("Find unavailable segments: %s for table: %s", unavailableSegments, tableName))); | |||
String.format("Found unavailable segments for table {%s}: {%s}", tableName, unavailableSegments))); |
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.
String.format("Found unavailable segments for table {%s}: {%s}", tableName, unavailableSegments))); | |
String.format("Found unavailable segments for table %s: %s", tableName, unavailableSegments))); |
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.
Consider adding number of unavailable segments, and only log up to 10 segments. If there are more than 10 segments unavailable, append ...
after the 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.
Done @Jackie-Jiang. Also, given that error path will be very infrequent, I felt it was ok to use stream way to build the string as opposed to StringBuilder and for loop.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #13451 +/- ##
============================================
+ Coverage 61.75% 61.98% +0.23%
+ Complexity 207 198 -9
============================================
Files 2436 2557 +121
Lines 133233 141194 +7961
Branches 20636 21914 +1278
============================================
+ Hits 82274 87519 +5245
- Misses 44911 47021 +2110
- Partials 6048 6654 +606
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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
@@ -243,7 +244,8 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S | |||
Set<String> unavailableSegments = entry.getValue(); | |||
numUnavailableSegments += unavailableSegments.size(); | |||
brokerResponse.addException(QueryException.getException(QueryException.SERVER_SEGMENT_MISSING_ERROR, | |||
String.format("Find unavailable segments: %s for table: %s", unavailableSegments, tableName))); | |||
String.format("Found unavailable segments for table %s: %s", tableName, |
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.
Suggest adding the count Found %d unavailable segments ...
* Fixed grammar. * Now logging table name first, before the list of segments, for better readability.
…che#13451) * Fixed grammar. * Now logging table name first, before the list of segments, for better readability.