JacksonYao287 commented on code in PR #3591:
URL: https://github.com/apache/ozone/pull/3591#discussion_r921893486


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -989,8 +991,14 @@ public void markContainerForClose(Container container)
       throws IOException {
     container.writeLock();
     try {
+      ContainerProtos.ContainerDataProto.State state =
+          container.getContainerState();
       // Move the container to CLOSING state only if it's OPEN/RECOVERING
-      if (HddsUtils.isOpenToWriteState(container.getContainerState())) {
+      if (HddsUtils.isOpenToWriteState(state)) {
+        if (state == RECOVERING) {

Review Comment:
   if we mark a recovering container for close  at datanode, it means this 
replica has been recovered successfully, so it should not be scrubbed by 
`staleRecoveringContainerScrubbingService`.
   



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