You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2021/06/28 03:33:39 UTC
[kafka] branch trunk updated: MINOR: To verify segment.hasOverflow,
the path of the segment should be printed (#10925)
This is an automated email from the ASF dual-hosted git repository.
guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new bc6873a MINOR: To verify segment.hasOverflow, the path of the segment should be printed (#10925)
bc6873a is described below
commit bc6873a61bf0f718a4a614fe4b442438763bf4b6
Author: 阿洋 <xi...@126.com>
AuthorDate: Mon Jun 28 11:32:06 2021 +0800
MINOR: To verify segment.hasOverflow, the path of the segment should be printed (#10925)
When refer to the return "Check whether the last offset of the last batch in this segment overflows the indexes", if the result is not expected, the path of the segment should be printed so that users can find problems.
Reviewers: Luke Chen, Guozhang Wang <wa...@gmail.com>
---
core/src/main/scala/kafka/log/Log.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/src/main/scala/kafka/log/Log.scala b/core/src/main/scala/kafka/log/Log.scala
index bccd2a3..69851da 100644
--- a/core/src/main/scala/kafka/log/Log.scala
+++ b/core/src/main/scala/kafka/log/Log.scala
@@ -2594,7 +2594,7 @@ object Log extends Logging {
producerStateManager: ProducerStateManager,
logPrefix: String): List[LogSegment] = {
require(Log.isLogFile(segment.log.file), s"Cannot split file ${segment.log.file.getAbsoluteFile}")
- require(segment.hasOverflow, "Split operation is only permitted for segments with overflow")
+ require(segment.hasOverflow, s"Split operation is only permitted for segments with overflow, and the problem path is ${segment.log.file.getAbsoluteFile}")
info(s"${logPrefix}Splitting overflowed segment $segment")