You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "chia7712 (via GitHub)" <gi...@apache.org> on 2025/04/05 17:07:56 UTC
Re: [PR] MINOR:modify scala $var to java string [kafka]
chia7712 commented on code in PR #18393:
URL: https://github.com/apache/kafka/pull/18393#discussion_r2029925512
##########
storage/src/main/java/org/apache/kafka/storage/internals/log/LocalLog.java:
##########
@@ -470,8 +470,8 @@ public FetchDataInfo read(long startOffset,
return maybeHandleIOException(
() -> "Exception while reading from " + topicPartition + " in dir " + dir.getParent(),
() -> {
- logger.trace("Reading maximum $maxLength bytes at offset {} from log with total length {} bytes",
- startOffset, segments.sizeInBytes());
+ logger.trace("Reading maximum {} bytes at offset {} from log with total length {} bytes",
+ maxLength, startOffset, segments.sizeInBytes());
Review Comment:
nit: Since `segments.sizeInBytes()` iterates through all segments to calculate the size, consider adding an `isTraceEnabled` flag to avoid unnecessary loops when trace logging is disabled by default.
@gongxuanzhang WDYT?
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org