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:
parent
70d23214fb
commit
17a29ac231
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue