From commits-return-9263-apmail-kafka-commits-archive=kafka.apache.org@kafka.apache.org Sat Mar 24 19:14:59 2018 Return-Path: X-Original-To: apmail-kafka-commits-archive@www.apache.org Delivered-To: apmail-kafka-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F1DA175DB for ; Sat, 24 Mar 2018 19:14:59 +0000 (UTC) Received: (qmail 72200 invoked by uid 500); 24 Mar 2018 19:14:59 -0000 Delivered-To: apmail-kafka-commits-archive@kafka.apache.org Received: (qmail 72095 invoked by uid 500); 24 Mar 2018 19:14:59 -0000 Mailing-List: contact commits-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list commits@kafka.apache.org Received: (qmail 72084 invoked by uid 99); 24 Mar 2018 19:14:59 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Mar 2018 19:14:59 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 936DF809FE; Sat, 24 Mar 2018 19:14:58 +0000 (UTC) Date: Sat, 24 Mar 2018 19:14:58 +0000 To: "commits@kafka.apache.org" Subject: [kafka] branch trunk updated: KAFKA-6637; Avoid divide by zero error with segment.ms set to zero (#4698) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <152191889809.18469.12887746681803642338@gitbox.apache.org> From: jgus@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: kafka X-Git-Refname: refs/heads/trunk X-Git-Reftype: branch X-Git-Oldrev: 685fd03dda02957a91a50fa16409400b1ea08f81 X-Git-Newrev: dd78b9fa268ad1708b6e6da583e8b7e2a6bd690a X-Git-Rev: dd78b9fa268ad1708b6e6da583e8b7e2a6bd690a X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 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 , Jason Gustafson --- 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.