Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 57945200B6D for ; Tue, 23 Aug 2016 19:55:58 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4C5FE160AC5; Tue, 23 Aug 2016 17:55:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BAD3D160A81 for ; Tue, 23 Aug 2016 19:55:32 +0200 (CEST) Received: (qmail 17274 invoked by uid 500); 23 Aug 2016 17:55:20 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 17236 invoked by uid 99); 23 Aug 2016 17:55:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2016 17:55:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9A6FE2C014E for ; Tue, 23 Aug 2016 17:55:20 +0000 (UTC) Date: Tue, 23 Aug 2016 17:55:20 +0000 (UTC) From: "Daniel Blum (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-4420) Possible divide-by-zero exception when closing BatchWriter MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 23 Aug 2016 17:55:58 -0000 [ https://issues.apache.org/jira/browse/ACCUMULO-4420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15433291#comment-15433291 ] Daniel Blum commented on ACCUMULO-4420: --------------------------------------- Small correction - an exception is not actually thrown in the 1.6.x versions due to an oddity in how Java is handling the math. In these versions the code is "tabletServersBatchSum / (double) numBatches" and somehow this ends up as NaN instead of throwing an exception. > Possible divide-by-zero exception when closing BatchWriter > ---------------------------------------------------------- > > Key: ACCUMULO-4420 > URL: https://issues.apache.org/jira/browse/ACCUMULO-4420 > Project: Accumulo > Issue Type: Bug > Components: core > Affects Versions: 1.6.5, 1.7.2 > Reporter: Daniel Blum > Priority: Minor > Fix For: 1.6.6, 1.7.3, 1.8.1 > > > TabletServerBatchWriter.logStats will throw a divide-by-zero exception if numBatches is 0 (i.e., no batches have been written). > There are actually no checks for 0 divisors anywhere in the method, so other such exceptions are possible, as are lesser issues ("Average send rate" and some other stats come out as NaN when no batches have been written, for example). -- This message was sent by Atlassian JIRA (v6.3.4#6332)