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 E02B9104DC for ; Thu, 21 Nov 2013 17:59:21 +0000 (UTC) Received: (qmail 16473 invoked by uid 500); 21 Nov 2013 17:59:21 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 16444 invoked by uid 500); 21 Nov 2013 17:59:21 -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 16421 invoked by uid 99); 21 Nov 2013 17:59:20 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Nov 2013 17:59:20 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B28FB89B7B9; Thu, 21 Nov 2013 17:59:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ecn@apache.org To: commits@accumulo.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: ACCUMULO-1914 make WALog cleanup after recovery an atomic mutation Date: Thu, 21 Nov 2013 17:59:15 +0000 (UTC) Updated Branches: refs/heads/1.5.1-SNAPSHOT df053b4e2 -> 7eaedc45b ACCUMULO-1914 make WALog cleanup after recovery an atomic mutation Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7eaedc45 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7eaedc45 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7eaedc45 Branch: refs/heads/1.5.1-SNAPSHOT Commit: 7eaedc45b0e59edbd583965cf9a602ce59bf3faf Parents: df053b4 Author: Eric Newton Authored: Thu Nov 21 12:58:45 2013 -0500 Committer: Eric Newton Committed: Thu Nov 21 12:58:45 2013 -0500 ---------------------------------------------------------------------- .../org/apache/accumulo/server/util/MetadataTable.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/7eaedc45/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java ---------------------------------------------------------------------- diff --git a/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java b/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java index aa5fe48..935671b 100644 --- a/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java +++ b/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java @@ -935,8 +935,8 @@ public class MetadataTable extends org.apache.accumulo.core.util.MetadataTable { } public static void removeUnusedWALEntries(KeyExtent extent, List logEntries, ZooLock zooLock) { - for (LogEntry entry : logEntries) { - if (entry.extent.isRootTablet()) { + if (extent.isRootTablet()) { + for (LogEntry entry : logEntries) { String root = getZookeeperLogLocation(); while (true) { try { @@ -949,11 +949,13 @@ public class MetadataTable extends org.apache.accumulo.core.util.MetadataTable { } UtilWaitThread.sleep(1000); } - } else { - Mutation m = new Mutation(entry.extent.getMetadataEntry()); + } + } else { + Mutation m = new Mutation(extent.getMetadataEntry()); + for (LogEntry entry : logEntries) { m.putDelete(Constants.METADATA_LOG_COLUMN_FAMILY, new Text(entry.server + "/" + entry.filename)); - update(SecurityConstants.getSystemCredentials(), zooLock, m); } + update(SecurityConstants.getSystemCredentials(), zooLock, m); } }