Repository: hbase
Updated Branches:
  refs/heads/branch-2 a50d9f435 -> b1901c9a1
  refs/heads/branch-2.0 263cc8d14 -> 0eacb3ea0
  refs/heads/master 70d23214f -> 17a29ac23


HBASE-20338 WALProcedureStore#recoverLease() should have fixed sleeps for 
retrying rollWriter()

Signed-off-by: Mike Drob <md...@apache.org>
Signed-off-by: Umesh Agashe <uaga...@cloudera.com>
Signed-off-by: Chia-Ping Tsai <chia7...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/17a29ac2
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/17a29ac2
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/17a29ac2

Branch: refs/heads/master
Commit: 17a29ac2313774850f0cce116ee33ef79d007a34
Parents: 70d2321
Author: Wei-Chiu Chuang <weic...@cloudera.com>
Authored: Thu Apr 5 14:11:29 2018 -0700
Committer: Mike Drob <md...@apache.org>
Committed: Thu Apr 12 16:33:55 2018 -0500

----------------------------------------------------------------------
 .../hbase/procedure2/store/wal/WALProcedureStore.java       | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/17a29ac2/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
----------------------------------------------------------------------
diff --git 
a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
 
b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
index c5680cf..f2931fc 100644
--- 
a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
+++ 
b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
@@ -359,7 +359,16 @@ public class WALProcedureStore extends ProcedureStoreBase {
     lock.lock();
     try {
       LOG.trace("Starting WAL Procedure Store lease recovery");
+      boolean afterFirstAttempt = false;
       while (isRunning()) {
+        // Don't sleep before first attempt
+        if (afterFirstAttempt) {
+          LOG.trace("Sleep {} ms after first lease recovery attempt.",
+              waitBeforeRoll);
+          Threads.sleepWithoutInterrupt(waitBeforeRoll);
+        } else {
+          afterFirstAttempt = true;
+        }
         FileStatus[] oldLogs = getLogFiles();
         // Get Log-MaxID and recover lease on old logs
         try {

Reply via email to