kfaraz commented on code in PR #15706:
URL: https://github.com/apache/druid/pull/15706#discussion_r1484104627
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScaler.java:
##########
@@ -149,7 +149,9 @@ private Runnable computeAndCollectLag()
long totalLags = lagStats.getTotalLag();
lagMetricsQueue.offer(totalLags > 0 ? totalLags : 0L);
}
- log.debug("Current lags [%s] for dataSource [%s].", new
ArrayList<>(lagMetricsQueue), dataSource);
+ if (log.isDebugEnabled()) {
+ log.debug("Current lags [%s] for dataSource [%s].", new
ArrayList<>(lagMetricsQueue), dataSource);
+ }
Review Comment:
Sorry I had missed this in the first review.
We can simplify this as follows:
```suggestion
log.debug("Current lags for dataSource[%s] are [%s].", dataSource,
lagMetricsQueue);
```
`CircularFifoQueue.toString` and `ArrayList.toString` would return the same
string, so no point converting to list.
--
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]