You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ri...@apache.org on 2023/02/27 18:25:28 UTC

[ozone] branch master updated: HDDS-8037. Improve logging in EC Reconstruction putBlock precondition check (#4320)

This is an automated email from the ASF dual-hosted git repository.

ritesh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new c755e5d645 HDDS-8037. Improve logging in EC Reconstruction putBlock precondition check (#4320)
c755e5d645 is described below

commit c755e5d6459af8abc0ba634d7901a497a80d0f72
Author: Stephen O'Donnell <st...@gmail.com>
AuthorDate: Mon Feb 27 18:25:20 2023 +0000

    HDDS-8037. Improve logging in EC Reconstruction putBlock precondition check (#4320)
---
 .../org/apache/hadoop/hdds/scm/storage/ECBlockOutputStream.java    | 6 +++++-
 .../container/ec/reconstruction/ECReconstructionCoordinator.java   | 7 ++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/ECBlockOutputStream.java b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/ECBlockOutputStream.java
index 1fb4b1dfb1..90cf4743f8 100644
--- a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/ECBlockOutputStream.java
+++ b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/ECBlockOutputStream.java
@@ -129,7 +129,11 @@ public class ECBlockOutputStream extends BlockOutputStream {
       List<ChunkInfo> checksumBlockDataChunks = checksumBlockData.getChunks();
 
       Preconditions.checkArgument(
-          currentChunks.size() == checksumBlockDataChunks.size());
+          currentChunks.size() == checksumBlockDataChunks.size(),
+          "The chunk list has " + currentChunks.size()
+              + " entries, but the checksum chunks has "
+              + checksumBlockDataChunks.size()
+              + " entries. They should be equal in size.");
       List<ChunkInfo> newChunkList = new ArrayList<>();
 
       for (int i = 0; i < currentChunks.size(); i++) {
diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinator.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinator.java
index 943e19a719..d4e3f7f1ac 100644
--- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinator.java
+++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinator.java
@@ -324,9 +324,10 @@ public class ECReconstructionCoordinator implements Closeable {
       // Even after retries if it failed, we should declare the
       // reconstruction as failed.
       // For now, let's throw the exception.
-      throw new IOException(
-          "Chunk write failed at the new target node: " + targetBlockStream
-              .getDatanodeDetails() + ". Aborting the reconstruction process.");
+      throw new IOException("Chunk write failed at the new target node: " +
+          targetBlockStream.getDatanodeDetails() +
+          ". Aborting the reconstruction process.",
+          targetBlockStream.getIoException());
     }
   }
 


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