bharatviswa504 commented on a change in pull request #2746:
URL: https://github.com/apache/ozone/pull/2746#discussion_r733921720



##########
File path: 
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java
##########
@@ -142,12 +143,36 @@ public synchronized void initialize() throws IOException {
       return;
     }
 
-    List<ChunkInfo> chunks;
+    List<ChunkInfo> chunks = null;
     try {
       chunks = getChunkInfos();
-    } catch (ContainerNotFoundException ioEx) {
-      refreshPipeline(ioEx);
-      chunks = getChunkInfos();
+    } catch(SCMSecurityException ex) {
+      throw ex;
+    } catch (IOException ioEx) {
+      // If refresh returns new pipeline, retry with it.
+      // If we get IOException due to connectivity issue,
+      // retry according to retry policy.
+      LOG.debug("Retry to get chunk info fail", ioEx);
+      if (ioEx instanceof StorageContainerException) {
+        refreshPipeline(ioEx);
+      }
+      IOException catchEx = ioEx;
+      while (shouldRetryRead(catchEx)) {
+        try {
+          chunks = getChunkInfos();

Review comment:
       Fixed it




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