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 6FF20103E8 for ; Tue, 3 Sep 2013 22:15:52 +0000 (UTC) Received: (qmail 36607 invoked by uid 500); 3 Sep 2013 22:15:52 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 36539 invoked by uid 500); 3 Sep 2013 22:15:52 -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 36530 invoked by uid 99); 3 Sep 2013 22:15:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Sep 2013 22:15:52 +0000 Date: Tue, 3 Sep 2013 22:15:52 +0000 (UTC) From: "John Vines (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (ACCUMULO-1410) ZooSession.connect barely adheres to timeout 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-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Vines reassigned ACCUMULO-1410: ------------------------------------ Assignee: John Vines > ZooSession.connect barely adheres to timeout > -------------------------------------------- > > Key: ACCUMULO-1410 > URL: https://issues.apache.org/jira/browse/ACCUMULO-1410 > Project: Accumulo > Issue Type: Bug > Components: client, fate > Reporter: John Vines > Assignee: John Vines > > ZooSession.connect, which is used by ZooKeeperInstance, takes an argument for a timeout, and utilizes it to an extent- > {quote} > if (System.currentTimeMillis() - startTime > 2 * timeout) > {quote} > However, this is only used after a check which uses hardcoded values. Currently, this is set to 10*1000ms. More specifically, it uses this value and checks every 100ms to see if it's connected. So if you have a tiny timeout, there are 2 issues: > # Your timeout is only useful in 10 second increments, rounded up > # You get a nice helpful error message that hides that real lengths of attempt > I think the block of code should be changed to just try to connect for the user specified timeout length, working in the same 100ms increments. This allows more granularity in the handling of the user specified values (and I think it also simplifies the code). This will also make the timeout message more accurate. -- 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