Moving to after watches and executor initialized

This commit is contained in:
Joshua Kim 2020-07-27 18:14:11 -04:00
parent 5a0a6c600e
commit 9c8b89e0c6

View file

@ -83,10 +83,8 @@ public class LeaseCleanupManager {
public void start() {
log.debug("Starting lease cleanup thread.");
if (!isRunning) {
completedLeaseStopwatch.start();
garbageLeaseStopwatch.start();
}
completedLeaseStopwatch.start();
garbageLeaseStopwatch.start();
deletionThreadPool.scheduleAtFixedRate(new LeaseCleanupThread(), INITIAL_DELAY, leaseCleanupIntervalMillis,
TimeUnit.MILLISECONDS);
@ -138,7 +136,7 @@ public class LeaseCleanupManager {
}
public LeaseCleanupResult cleanupLease(LeasePendingDeletion leasePendingDeletion,
boolean timeToCheckForCompletedShard, boolean timeToCheckForGarbageShard) throws TimeoutException,
boolean timeToCheckForCompletedShard, boolean timeToCheckForGarbageShard) throws TimeoutException,
InterruptedException, DependencyException, ProvisionedThroughputException, InvalidStateException {
final Lease lease = leasePendingDeletion.lease();
final ShardInfo shardInfo = leasePendingDeletion.shardInfo();