HDFS-16819. Modify patch based on comments

This commit is contained in:
Haiyang.Hu 2022-10-27 10:37:15 +08:00
parent 09dacd784a
commit 77cc37d29a
1 changed files with 1 additions and 2 deletions

View File

@ -1888,7 +1888,6 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
invalidate(b.getBlockPoolId(), new Block[] { lastFoundReplicaInfo },
false);
}
long startHoldLockTimeMs = Time.monotonicNow();
FsVolumeReference ref = volumes.getNextVolume(storageType, storageId, b
.getNumBytes());
FsVolumeImpl v = (FsVolumeImpl) ref.getVolume();
@ -1909,7 +1908,7 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
} finally {
if (dataNodeMetrics != null) {
// Create temporary operation hold write lock once.
long createTemporaryOpMs = Time.monotonicNow() - startHoldLockTimeMs;
long createTemporaryOpMs = Time.monotonicNow() - startTimeMs;
dataNodeMetrics.addCreateTemporaryOp(createTemporaryOpMs);
}
}