F64116045 commented on code in PR #11199:
URL: https://github.com/apache/ozone/pull/11199#discussion_r3971359944
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java:
##########
@@ -367,6 +372,8 @@ public synchronized void processAll() {
ReplicationManagerReport report = new ReplicationManagerReport(
rmConf.getContainerSampleLimit());
ReplicationQueue newRepQueue = new ReplicationQueue();
+ checksumMismatchCheckHandler.startScan();
Review Comment:
~~I was thinking about whether to remove this scan lifecycle.~~
~~Now that the debounce is gone, `handle()` could write the mismatch
directly to `ReplicationManagerReport`, so these methods are no longer needed
for detection.~~
~~But if we remove it, SCM would calculate the mismatch again when the CLI
calls the RPC instead of returning the last full-scan result. The same warning
would also be logged on every scan unless we keep separate state for it.~~
Thinking about this again, I think removing the `startScan()`,
`completeScan()`, and `abortScan()` lifecycle would be simpler.
`handle()` can now write the mismatch directly to
`ReplicationManagerReport`, and `getContainerReplicasResponse()` can calculate
the CLI flag from the replicas it already fetches.
That removes the need for `reportedMismatches`. Only `warnedMismatches`
needs to stay to avoid duplicate logs.
--
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]