BUG-ID: CS-19196: Relax HA work termination rule on exceptions. It could cause premature HA termination due to unhandled exceptions. Reviewed-By:Anthony

This commit is contained in:
Kelven Yang 2014-03-07 17:15:04 -08:00
parent 5310e66f30
commit 3123c30f23
1 changed files with 8 additions and 2 deletions

View File

@ -913,8 +913,14 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai
work.setDateTaken(null);
}
} catch (Exception e) {
s_logger.error("Terminating " + work, e);
work.setStep(Step.Error);
s_logger.warn("Encountered unhandled exception during HA process, reschedule retry", e);
long nextTime = (System.currentTimeMillis() >> 10) + _restartRetryInterval;
s_logger.info("Rescheduling " + work + " to try again at " + new Date(nextTime << 10));
work.setTimeToTry(nextTime);
work.setServerId(null);
work.setDateTaken(null);
}
_haDao.update(work.getId(), work);
} catch (final Throwable th) {