showuon commented on a change in pull request #10742: URL: https://github.com/apache/kafka/pull/10742#discussion_r637340043
########## File path: core/src/main/scala/kafka/log/Log.scala ########## @@ -2226,12 +2231,14 @@ object Log extends Logging { * @param topicPartition The topic partition * @param logDirFailureChannel The LogDirFailureChannel to asynchronously handle log dir failure * @param recordVersion The record version + * @param logPrefix The logging prefix * @return The new LeaderEpochFileCache instance (if created), none otherwise */ def maybeCreateLeaderEpochCache(dir: File, topicPartition: TopicPartition, logDirFailureChannel: LogDirFailureChannel, - recordVersion: RecordVersion): Option[LeaderEpochFileCache] = { + recordVersion: RecordVersion, + logPrefix: String): Option[LeaderEpochFileCache] = { Review comment: Could we add the default `logPrefix` parameter value to empty string? So all the tests don't need to update. ########## File path: core/src/test/scala/unit/kafka/cluster/PartitionLockTest.scala ########## @@ -283,7 +283,7 @@ class PartitionLockTest extends Logging { val log = super.createLog(isNew, isFutureReplica, offsetCheckpoints, None) val logDirFailureChannel = new LogDirFailureChannel(1) val segments = new LogSegments(log.topicPartition) - val leaderEpochCache = Log.maybeCreateLeaderEpochCache(log.dir, log.topicPartition, logDirFailureChannel, log.config.messageFormatVersion.recordVersion) + val leaderEpochCache = Log.maybeCreateLeaderEpochCache(log.dir, log.topicPartition, logDirFailureChannel, log.config.messageFormatVersion.recordVersion, "") Review comment: As above mentioned, if the default logPrefix is empty string, then the following change in tests are not needed. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org