</BUG>
}
catch (Exception e) {
<BUG>logger.error("Cannot renew lease {}", lease.getLeaseId(), e);
}

}
}, new OneShotTrigger(
getRenewalSeconds(lease, minRenewalSeconds, expiryThresholdSeconds)));</BUG>
schedules.put(lease, scheduledFuture);

if (LeaseRenewalScheduler.this.currentLease.get() != lease) {
logger.debug("Current lease has changed. Skipping renewal");
return;
}
logger.debug("Renewing lease {}", lease.getLeaseId());
LeaseRenewalScheduler.this.currentLease.compareAndSet(
lease, renewLease.renewLease(lease));
}
catch (Exception e) {
logger.error("Cannot renew lease {}", lease.getLeaseId(),
e);
