You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/07/15 07:32:33 UTC

[GitHub] [ozone] JacksonYao287 commented on a diff in pull request #3591: HDDS-6987. EC: Implement RECOVERING Container Scrubber

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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org