Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 68A20E502 for ; Thu, 24 Jan 2013 17:11:13 +0000 (UTC) Received: (qmail 48271 invoked by uid 500); 24 Jan 2013 17:11:13 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 48232 invoked by uid 500); 24 Jan 2013 17:11:13 -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 48217 invoked by uid 99); 24 Jan 2013 17:11:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2013 17:11:13 +0000 Date: Thu, 24 Jan 2013 17:11:12 +0000 (UTC) From: "Keith Turner (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-984) Check potentially unexpected behavior with TimeUnit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ACCUMULO-984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561769#comment-13561769 ] Keith Turner commented on ACCUMULO-984: --------------------------------------- I like option 2. There are some existing hadoop and accumulo configs where 0 means forever. Using -1 would be inconsistent with these other configurations, which in IMO would be confusing. > Check potentially unexpected behavior with TimeUnit > --------------------------------------------------- > > Key: ACCUMULO-984 > URL: https://issues.apache.org/jira/browse/ACCUMULO-984 > Project: Accumulo > Issue Type: Sub-task > Components: client > Reporter: Christopher Tubbs > Fix For: 1.5.0 > > > For maxTimeout and maxLatency, there is potentially unexpected behavior if the user sets a (very) small value. Internally, these values are stored as MILLISECONDS, but TimeUnit supports MICROSECONDS, and NANOSECONDS, which means that when we convert values to MILLISECONDS, if the value is small, the conversion could lose precision and change a really small value to an exact value of 0 MILLISECONDS, which has the special interpretation of INFINITY. Setting a really small value that internally converts to INFINITY (or Long.MAX_VALUE, at the very least) is incorrect. > We just to need to check this and possibly clean up the code to behave in a way more congruent with the behavior users might expect. > Options: > # Treat -1 as +INF instead of 0 (which I think more intuitively means "immediate" instead of "never" for a span of time). > # Always round up to 1 millisecond, if the value would normally round down to 0 and wasn't already 0 to begin with. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira