Moving to after watches and executor initialized
This commit is contained in:
parent
5a0a6c600e
commit
9c8b89e0c6
1 changed files with 3 additions and 5 deletions
|
|
@ -83,10 +83,8 @@ public class LeaseCleanupManager {
|
||||||
public void start() {
|
public void start() {
|
||||||
log.debug("Starting lease cleanup thread.");
|
log.debug("Starting lease cleanup thread.");
|
||||||
|
|
||||||
if (!isRunning) {
|
completedLeaseStopwatch.start();
|
||||||
completedLeaseStopwatch.start();
|
garbageLeaseStopwatch.start();
|
||||||
garbageLeaseStopwatch.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
deletionThreadPool.scheduleAtFixedRate(new LeaseCleanupThread(), INITIAL_DELAY, leaseCleanupIntervalMillis,
|
deletionThreadPool.scheduleAtFixedRate(new LeaseCleanupThread(), INITIAL_DELAY, leaseCleanupIntervalMillis,
|
||||||
TimeUnit.MILLISECONDS);
|
TimeUnit.MILLISECONDS);
|
||||||
|
|
@ -138,7 +136,7 @@ public class LeaseCleanupManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public LeaseCleanupResult cleanupLease(LeasePendingDeletion leasePendingDeletion,
|
public LeaseCleanupResult cleanupLease(LeasePendingDeletion leasePendingDeletion,
|
||||||
boolean timeToCheckForCompletedShard, boolean timeToCheckForGarbageShard) throws TimeoutException,
|
boolean timeToCheckForCompletedShard, boolean timeToCheckForGarbageShard) throws TimeoutException,
|
||||||
InterruptedException, DependencyException, ProvisionedThroughputException, InvalidStateException {
|
InterruptedException, DependencyException, ProvisionedThroughputException, InvalidStateException {
|
||||||
final Lease lease = leasePendingDeletion.lease();
|
final Lease lease = leasePendingDeletion.lease();
|
||||||
final ShardInfo shardInfo = leasePendingDeletion.shardInfo();
|
final ShardInfo shardInfo = leasePendingDeletion.shardInfo();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue