Copilot commented on code in PR #11230:
URL: https://github.com/apache/ozone/pull/11230#discussion_r3988048437


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java:
##########
@@ -878,10 +876,10 @@ protected boolean processContainer(ContainerInfo 
containerInfo,
       if (!handled) {
         LOG.debug("Container {} had no actions after passing through the " +
             "check chain", containerInfo.containerID());
-        // Container remains HEALTHY (set at start of loop)
       }
-      // Apply final health state from report to container
-      containerInfo.setHealthState(report.getContainerHealthState());
+      if (!readOnly) {
+        containerInfo.setHealthState(checkRequest.getHealthState());
+      }

Review Comment:
   This guard regresses the existing read-only classification path. 
`checkContainerStatus()` calls `processContainer(..., true)`, and callers such 
as `TestReconContainerHealthSummaryEndToEnd` inspect 
`containerInfo.getHealthState()` after that call; with this guard the request's 
result is never copied back, so the container keeps its previous (often 
`HEALTHY`) state. Read-only handling already suppresses commands in the 
handlers, so keep this health-state assignment unconditional.



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