You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by jg...@apache.org on 2018/03/24 19:14:58 UTC
[kafka] branch trunk updated: KAFKA-6637;
Avoid divide by zero error with segment.ms set to zero (#4698)
This is an automated email from the ASF dual-hosted git repository.
jgus 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 dd78b9f KAFKA-6637; Avoid divide by zero error with segment.ms set to zero (#4698)
dd78b9f is described below
commit dd78b9fa268ad1708b6e6da583e8b7e2a6bd690a
Author: huxi <hu...@hotmail.com>
AuthorDate: Sun Mar 25 03:14:53 2018 +0800
KAFKA-6637; Avoid divide by zero error with segment.ms set to zero (#4698)
Require a minimum value of 1 for `segment.ms` to avoid division by zero when computing random jitter.
Reviewers: Manikumar Reddy O <ma...@gmail.com>, Jason Gustafson <ja...@confluent.io>
---
core/src/main/scala/kafka/log/LogConfig.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/src/main/scala/kafka/log/LogConfig.scala b/core/src/main/scala/kafka/log/LogConfig.scala
index 30ca333..0db49e7 100755
--- a/core/src/main/scala/kafka/log/LogConfig.scala
+++ b/core/src/main/scala/kafka/log/LogConfig.scala
@@ -214,7 +214,7 @@ object LogConfig {
new LogConfigDef()
.define(SegmentBytesProp, INT, Defaults.SegmentSize, atLeast(Message.MinMessageOverhead), MEDIUM,
SegmentSizeDoc, KafkaConfig.LogSegmentBytesProp)
- .define(SegmentMsProp, LONG, Defaults.SegmentMs, atLeast(0), MEDIUM, SegmentMsDoc,
+ .define(SegmentMsProp, LONG, Defaults.SegmentMs, atLeast(1), MEDIUM, SegmentMsDoc,
KafkaConfig.LogRollTimeMillisProp)
.define(SegmentJitterMsProp, LONG, Defaults.SegmentJitterMs, atLeast(0), MEDIUM, SegmentJitterMsDoc,
KafkaConfig.LogRollTimeJitterMillisProp)
--
To stop receiving notification emails like this one, please contact
jgus@apache.org.