accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [accumulo] keith-turner commented on a change in pull request #1005: Fix #949 handle WAL failure to prevent stuck Accumulo
Date Thu, 07 Mar 2019 16:20:11 GMT
keith-turner commented on a change in pull request #1005: Fix #949 handle WAL failure to prevent
stuck Accumulo
URL: https://github.com/apache/accumulo/pull/1005#discussion_r263451130
 
 

 ##########
 File path: server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
 ##########
 @@ -276,29 +276,21 @@ public void run() {
         final ServerResources conf = tserver.getServerConfig();
         final VolumeManager fs = conf.getFileSystem();
         while (!nextLogMaker.isShutdown()) {
-          DfsLogger alog = null;
+          log.debug("Creating next WAL");
+          DfsLogger alog = null;;
           try {
-            log.debug("Creating next WAL");
             alog = new DfsLogger(conf, syncCounter, flushCounter);
             alog.open(tserver.getClientAddressString());
-            String fileName = alog.getFileName();
-            log.debug("Created next WAL " + fileName);
-            tserver.addNewLogMarker(alog);
-            while (!nextLog.offer(alog, 12, TimeUnit.HOURS)) {
-              log.info("Our WAL was not used for 12 hours: " + fileName);
-            }
           } catch (Exception t) {
             log.error("Failed to open WAL", t);
-            if (null != alog) {
-              // It's possible that the sync of the header and OPEN record to the WAL failed
-              // We want to make sure that clean up the resources/thread inside the DfsLogger
-              // object before trying to create a new one.
+            // the log is not advertised in ZK yet, so we can just delete it if it exists
+            if (alog != null) {
               try {
                 alog.close();
               } catch (Exception e) {
                 log.error("Failed to close WAL after it failed to open", e);
               }
-              // Try to avoid leaving a bunch of empty WALs lying around
+
               try {
                 Path path = alog.getPath();
                 if (fs.exists(path)) {
 
 Review comment:
   I think this exists check may be unnecessary, but not completely sure.  I suspect its there
to avoid unneeded warnings. If an exception is not thrown when the file does not exists then
there then it seems like it would be ok to remove the exists check.  The HDFS delete call
returns a boolean, so maybe it doesn't throw an exception.
   
   This is a pre-existing issue, it does not have to be changed for this PR to be merged.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message