virajjasani commented on a change in pull request #2689:
URL: https://github.com/apache/hbase/pull/2689#discussion_r528497903



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java
##########
@@ -60,10 +62,29 @@ public void preClean() {
       wals = queueStorage.getAllWALs();
     } catch (ReplicationException e) {
       LOG.warn("Failed to read zookeeper, skipping checking deletable files");

Review comment:
       Let's log this warn only if root cause of `ReplicationException` is not 
covered by below mentioned `if` condition.
   Something like this:
   ```
    catch (ReplicationException e) {
         Throwable cause = e.getCause();
         if (cause instanceof KeeperException.ConnectionLossException
           || cause instanceof KeeperException.SessionExpiredException
           || cause instanceof KeeperException.UnknownSessionException) {
           try {
             reconnectAfterKeeperException();
             wals = queueStorage.getAllWALs();
             return;
           } catch (IOException | ReplicationException ex) {
             LOG.warn("Failed to reconnect zookeeper or load all wal in 
replication queues.", ex);
           }
         } else {
           LOG.warn("Failed to read zookeeper, skipping checking deletable 
files", e);
         }
         wals = null;
       }
   ```




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to