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

Signed-off-by: Mike Drob <mdrob@apache.org>
Signed-off-by: Umesh Agashe <uagashe@cloudera.com>
Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Wei-Chiu Chuang 2018-04-05 14:11:29 -07:00 committed by Mike Drob
parent 70d23214fb
commit 17a29ac231
1 changed files with 9 additions and 0 deletions

View File

@ -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 {