accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject git commit: ACCUMULO-1914 make WALog cleanup after recovery an atomic mutation
Date Thu, 21 Nov 2013 17:59:15 GMT
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 <eric.newton@gmail.com>
Authored: Thu Nov 21 12:58:45 2013 -0500
Committer: Eric Newton <eric.newton@gmail.com>
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<LogEntry> 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);
     }
   }
   


Mime
View raw message