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/10/10 13:56:02 UTC

[GitHub] [ozone] sodonnel commented on a diff in pull request #3816: HDDS-7303. EC: ECBlockReconstructedStripeInputStream should set initialized false on re-init

sodonnel commented on code in PR #3816:
URL: https://github.com/apache/ozone/pull/3816#discussion_r991318809


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/ozone/client/io/ECBlockReconstructedStripeInputStream.java:
##########
@@ -212,12 +212,14 @@ public synchronized void setRecoveryIndexes(Collection<Integer> indexes) {
   }
 
   private void init() throws InsufficientLocationsException {
+    initialized = false;
     if (decoder == null) {
       decoder = CodecUtil.createRawDecoderWithFallback(getRepConfig());
     }
     if (!hasSufficientLocations()) {
-      throw new InsufficientLocationsException("There are insufficient " +
-          "datanodes to read the EC block");
+      String msg = "There are insufficient datanodes to read the EC block";
+      LOG.debug(msg);

Review Comment:
   Generally the caller should log the exception higher up the stack. If you log at the source of the exception, you generally end up logging it twice. That is the reason I made this a debug log, but also because we are not certain this fix is the root cause of the problem we have seen, so it would be good to have the debug log incase we see the problem again.



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