Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-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 6FA09F9CB for ; Tue, 2 Apr 2013 20:19:37 +0000 (UTC) Received: (qmail 40309 invoked by uid 500); 2 Apr 2013 20:19:37 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 40284 invoked by uid 500); 2 Apr 2013 20:19:37 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 40277 invoked by uid 99); 2 Apr 2013 20:19:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Apr 2013 20:19:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Apr 2013 20:19:36 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 08AD223888CD; Tue, 2 Apr 2013 20:19:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1463735 - in /accumulo/trunk: ./ assemble/ core/ examples/ fate/src/main/java/org/apache/accumulo/fate/ fate/src/main/java/org/apache/accumulo/fate/zookeeper/ server/ server/src/main/java/org/apache/accumulo/server/util/ src/ Date: Tue, 02 Apr 2013 20:19:15 -0000 To: commits@accumulo.apache.org From: ecn@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130402201916.08AD223888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ecn Date: Tue Apr 2 20:19:15 2013 New Revision: 1463735 URL: http://svn.apache.org/r1463735 Log: ACCUMULO-1233 retry znode child scans Modified: accumulo/trunk/ (props changed) accumulo/trunk/assemble/ (props changed) accumulo/trunk/core/ (props changed) accumulo/trunk/examples/ (props changed) accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java (contents, props changed) accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java (props changed) accumulo/trunk/server/ (props changed) accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java accumulo/trunk/src/ (props changed) Propchange: accumulo/trunk/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5:r1463734 Propchange: accumulo/trunk/assemble/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5/assemble:r1463734 Propchange: accumulo/trunk/core/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5/core:r1463734 Propchange: accumulo/trunk/examples/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5/examples:r1463734 Modified: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java URL: http://svn.apache.org/viewvc/accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java?rev=1463735&r1=1463734&r2=1463735&view=diff ============================================================================== --- accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java (original) +++ accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java Tue Apr 2 20:19:15 2013 @@ -250,16 +250,20 @@ public class ZooStore implements TSto public Repo top(long tid) { verifyReserved(tid); - try { - String txpath = getTXPath(tid); - String top = findTop(txpath); - if (top == null) - return null; - - byte[] ser = zk.getData(txpath + "/" + top, null); - return (Repo) deserialize(ser); - } catch (Exception e) { - throw new RuntimeException(e); + while (true) { + try { + String txpath = getTXPath(tid); + String top = findTop(txpath); + if (top == null) + return null; + + byte[] ser = zk.getData(txpath + "/" + top, null); + return (Repo) deserialize(ser); + } catch (KeeperException.NoNodeException ex) { + continue; + } catch (Exception e) { + throw new RuntimeException(e); + } } } Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1463734 Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1463734 Propchange: accumulo/trunk/server/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5/server:r1463734 Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java?rev=1463735&r1=1463734&r2=1463735&view=diff ============================================================================== --- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java (original) +++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java Tue Apr 2 20:19:15 2013 @@ -892,10 +892,20 @@ public class MetadataTable extends org.a private static void getRootLogEntries(ArrayList result) throws KeeperException, InterruptedException, IOException { IZooReaderWriter zoo = ZooReaderWriter.getInstance(); String root = getZookeeperLogLocation(); - for (String child : zoo.getChildren(root)) { - LogEntry e = new LogEntry(); - e.fromBytes(zoo.getData(root + "/" + child, null)); - result.add(e); + // there's a little race between getting the children and fetching + // the data. The log can be removed in between. + while (true) { + result.clear(); + for (String child : zoo.getChildren(root)) { + LogEntry e = new LogEntry(); + try { + e.fromBytes(zoo.getData(root + "/" + child, null)); + result.add(e); + } catch (KeeperException.NoNodeException ex) { + continue; + } + } + break; } } Propchange: accumulo/trunk/src/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5/src:r1463734