Copilot commented on code in PR #17088:
URL: https://github.com/apache/pinot/pull/17088#discussion_r2467640453
##########
pinot-spi/src/main/java/org/apache/pinot/spi/stream/StreamMetadataProvider.java:
##########
@@ -86,7 +87,24 @@ StreamPartitionMsgOffset
fetchStreamPartitionOffset(OffsetCriteria offsetCriteri
default List<PartitionGroupMetadata> computePartitionGroupMetadata(String
clientId, StreamConfig streamConfig,
List<PartitionGroupConsumptionStatus> partitionGroupConsumptionStatuses,
int timeoutMillis)
throws IOException, TimeoutException {
- int partitionCount = fetchPartitionCount(timeoutMillis);
+
+ int partitionCount;
+ try {
+ partitionCount = fetchPartitionCount(timeoutMillis);
+ } catch (Exception e) {
+ LOGGER.warn("Failed to fetch partition count for stream config: {}.
Skipping stream and using"
+ + "existing partitions only. Error: {}", streamConfig.getTopicName(),
e.getMessage(), e);
Review Comment:
The log message is split across two lines with a string concatenation using
`+`. This should be written as a single continuous string literal for better
readability and to avoid the concatenation operator.
```suggestion
LOGGER.warn("Failed to fetch partition count for stream config: {}.
Skipping stream and using existing partitions only. Error: {}",
streamConfig.getTopicName(), e.getMessage(), e);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]