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 2021/06/29 06:43:36 UTC

[GitHub] [ozone] cchenax opened a new pull request #2376: HDDS-5149 when source datanode download container tar from target datanode,but the target datanode container file missing,import error

cchenax opened a new pull request #2376:
URL: https://github.com/apache/ozone/pull/2376


   ## What changes were proposed in this pull request?
   
   fix if the metadatafile or chunksfile missing import export container error
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/projects/HDDS/issues/HDDS-5149?filter=addedrecently
   
   ## How was this patch tested?
   ci
   


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


[GitHub] [ozone] errose28 edited a comment on pull request #2376: HDDS-5149 when source datanode download container tar from target datanode,but the target datanode container file missing,import error

Posted by GitBox <gi...@apache.org>.
errose28 edited a comment on pull request #2376:
URL: https://github.com/apache/ozone/pull/2376#issuecomment-1065513249


   This should be handled by #3052 now.


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


[GitHub] [ozone] github-actions[bot] closed pull request #2376: HDDS-5149 when source datanode download container tar from target datanode,but the target datanode container file missing,import error

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #2376:
URL: https://github.com/apache/ozone/pull/2376


   


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


[GitHub] [ozone] github-actions[bot] commented on pull request #2376: HDDS-5149 when source datanode download container tar from target datanode,but the target datanode container file missing,import error

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #2376:
URL: https://github.com/apache/ozone/pull/2376#issuecomment-938239737


   Thank you very much for the patch. I am closing this PR __temporarily__ as there was no activity recently and it is waiting for response from its author.
   
   It doesn't mean that this PR is not important or ignored: feel free to reopen the PR at any time.
   
   It only means that attention of committers is not required. We prefer to keep the review queue clean. This ensures PRs in need of review are more visible, which results in faster feedback for all PRs.
   
   If you need ANY help to finish this PR, please [contact the community](https://github.com/apache/hadoop-ozone#contact) on the mailing list or the slack channel."


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


[GitHub] [ozone] adoroszlai commented on pull request #2376: HDDS-5149 when source datanode download container tar from target datanode,but the target datanode container file missing,import error

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on pull request #2376:
URL: https://github.com/apache/ozone/pull/2376#issuecomment-921014221


   /pending


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


[GitHub] [ozone] adoroszlai commented on a change in pull request #2376: HDDS-5149 when source datanode download container tar from target datanode,but the target datanode container file missing,import error

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on a change in pull request #2376:
URL: https://github.com/apache/ozone/pull/2376#discussion_r668079121



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/DownloadAndImportReplicator.java
##########
@@ -122,7 +122,15 @@ public void replicate(ReplicationTask task) {
                 containerID, bytes);
         task.setTransferredBytes(bytes);
 
-        importContainer(containerID, path);
+        if (bytes <= 0) {
+          task.setStatus(Status.FAILED);
+          LOG.warn("Container {} is downloaded with size {}",
+              containerID, bytes);
+        } else {
+          importContainer(containerID, path);
+          LOG.info("Container {} is replicated successfully", containerID);
+          task.setStatus(Status.DONE);
+        }
         LOG.info("Container {} is replicated successfully", containerID);
         task.setStatus(Status.DONE);

Review comment:
       This would overwrite previous `FAILED` status.

##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/TarContainerPacker.java
##########
@@ -152,6 +157,20 @@ public void pack(Container<KeyValueContainerData> container,
     try (OutputStream compressed = compress(output);
          ArchiveOutputStream archiveOutput = tar(compressed)) {
 
+      if (!containerData.getDbFile().exists()) {
+        LOG.warn("DBfile {} not exist",
+            containerData.getDbFile().toPath().toString());
+        return;
+      } else if (!new File(containerData.getChunksPath()).exists()) {
+        LOG.warn("Chunkfile {} not exist",
+            containerData.getDbFile().toPath().toString());
+        return;
+      } else if (!container.getContainerFile().exists()) {
+        LOG.warn("Containerfile {} not exist",
+            containerData.getDbFile().toPath().toString());
+        return;
+      }

Review comment:
       > > Would it make sense to utilize `Container.scanMetadata()` instead? More complete checks without introducing duplication.
   >
   > Ok,I will change it.thank you very much!
   
   This [comment](https://github.com/apache/ozone/pull/2196/files#r628170059) from the previous PR still applies.




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


[GitHub] [ozone] errose28 commented on pull request #2376: HDDS-5149 when source datanode download container tar from target datanode,but the target datanode container file missing,import error

Posted by GitBox <gi...@apache.org>.
errose28 commented on pull request #2376:
URL: https://github.com/apache/ozone/pull/2376#issuecomment-1065513249


   This should be handled by #3053 now.


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