devmadhuu commented on code in PR #11199:
URL: https://github.com/apache/ozone/pull/11199#discussion_r3986012100


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ReconReplicationManager.java:
##########
@@ -240,29 +243,38 @@ public synchronized void start() {
    * </ul>
    * </p>
    *
-   * <p>EC replicas are compared only within the same replica index, since 
different indexes contain different data or
-   * parity fragments. Non-EC replicas are compared together.</p>
+   * <p>RATIS replicas are compared together. EC replicas are compared only 
within the same replica index, since
+   * different indexes contain different data or parity fragments. Within each 
group, only replicas with the same
+   * sequence ID and non-zero data checksums are compared.</p>
    *
    * @param container Container whose replicas are checked
    * @param replicas Set of container replicas to check
    * @return true if comparable replicas have different data checksums
    */
-  private boolean hasDataChecksumMismatch(ContainerInfo container, 
Set<ContainerReplica> replicas) {
-    if (replicas == null || replicas.isEmpty()) {
+  private boolean hasDataChecksumMismatch(
+      ContainerInfo container, Set<ContainerReplica> replicas) {
+    if (container.getState() != CLOSED || replicas == null) {
       return false;
     }
 
-    boolean isEC = container.getReplicationType() == ReplicationType.EC;
-    Map<Integer, Long> checksumsByIndex = new HashMap<>();
+    if (container.getReplicationType() == RATIS) {
+      return hasMismatch(replicas, ContainerReplica::getSequenceId,
+          ContainerReplica::getDataChecksum);
+    }
+
+    if (container.getReplicationType() != ReplicationType.EC) {

Review Comment:
   I think this has been fixed as part of #11215 



-- 
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]

Reply via email to