|
@@ -538,6 +538,7 @@ class BPServiceActor implements Runnable {
|
|
|
|
|
|
HeartbeatResponse sendHeartBeat(boolean requestBlockReportLease)
|
|
|
throws IOException {
|
|
|
+ scheduler.scheduleNextHeartbeat();
|
|
|
StorageReport[] reports =
|
|
|
dn.getFSDataset().getStorageReports(bpos.getBlockPoolId());
|
|
|
if (LOG.isDebugEnabled()) {
|
|
@@ -651,7 +652,6 @@ class BPServiceActor implements Runnable {
|
|
|
//
|
|
|
boolean requestBlockReportLease = (fullBlockReportLeaseId == 0) &&
|
|
|
scheduler.isBlockReportDue(startTime);
|
|
|
- scheduler.scheduleNextHeartbeat();
|
|
|
if (!dn.areHeartbeatsDisabledForTests()) {
|
|
|
resp = sendHeartBeat(requestBlockReportLease);
|
|
|
assert resp != null;
|
|
@@ -1064,7 +1064,7 @@ class BPServiceActor implements Runnable {
|
|
|
|
|
|
long scheduleNextHeartbeat() {
|
|
|
// Numerical overflow is possible here and is okay.
|
|
|
- nextHeartbeatTime += heartbeatIntervalMs;
|
|
|
+ nextHeartbeatTime = monotonicNow() + heartbeatIntervalMs;
|
|
|
return nextHeartbeatTime;
|
|
|
}
|
|
|
|