accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1470708 - /accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
Date Mon, 22 Apr 2013 20:37:26 GMT
Author: ecn
Date: Mon Apr 22 20:37:25 2013
New Revision: 1470708

URL: http://svn.apache.org/r1470708
Log:
ACCUMULO-578 don't log a message for every time a sorted WALOG disappears

Modified:
    accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java

Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java?rev=1470708&r1=1470707&r2=1470708&view=diff
==============================================================================
--- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
(original)
+++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
Mon Apr 22 20:37:25 2013
@@ -189,15 +189,21 @@ public class GarbageCollectWriteAheadLog
     
     for (String sortedWALog : sortedWALogs) {
       log.debug("Removing sorted WAL " + sortedWALog);
+      Path swalog = new Path(recoveryDir, sortedWALog);
       try {
-        Path swalog = new Path(recoveryDir, sortedWALog);
-        if (trash == null || (fs.exists(swalog) && !trash.moveToTrash(swalog))) {
+        if (trash == null || !trash.moveToTrash(swalog)) {
           fs.delete(swalog, true);
         }
       } catch (FileNotFoundException ex) {
         // ignored
       } catch (IOException ioe) {
-        log.error("Unable to delete sorted walog " + sortedWALog + ": " + ioe);
+        try {
+          if (fs.exists(swalog)) {
+            log.error("Unable to delete sorted walog " + sortedWALog + ": " + ioe);
+          }
+        } catch (IOException ex) {
+          log.error("Unable to check for the existence of " + sortedWALog, ex);
+        }
       }
     }
 



Mime
View raw message