slfan1989 commented on code in PR #8939:
URL: https://github.com/apache/hadoop/pull/8939#discussion_r4572859340
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java:
##########
@@ -2868,7 +2868,7 @@ public void checkAndUpdate(String bpid, ScanInfo scanInfo)
.build();
volumeMap.add(bpid, diskBlockInfo);
if (curDirScannerNotifyCount < maxDirScannerNotifyCount) {
- maxDirScannerNotifyCount++;
+ curDirScannerNotifyCount++;
Review Comment:
Thanks for fixing the counter.
Could we also initialize `lastDirScannerNotifyTime` with
`Time.monotonicNow()`?
`checkAndUpdate()` uses that clock to decide when to reset the budget, but
the constructor uses `System.currentTimeMillis()`.
I reproduced this with a limit of one and a one-second block report
interval. The budget stayed exhausted after the interval elapsed. Could we add
a regression test that verifies a notification can be sent again in the next
interval?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]