bharatviswa504 commented on a change in pull request #942:
URL: https://github.com/apache/hadoop-ozone/pull/942#discussion_r428361979



##########
File path: 
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockOutputStream.java
##########
@@ -317,10 +317,16 @@ private void handleFullBuffer() throws IOException {
       if (!commitWatcher.getFutureMap().isEmpty()) {
         waitOnFlushFutures();
       }
-    } catch (InterruptedException | ExecutionException e) {
+    } catch (ExecutionException e) {
       setIoException(e);
       adjustBuffersOnException();
       throw getIoException();
+    } catch (InterruptedException ex) {
+      LOG.error("Command execution was interrupted.");
+      Thread.currentThread().interrupt();
+      setIoException(ex);
+      adjustBuffersOnException();

Review comment:
       Same code is in multiple places, can we have short utility to do all 
these in that. So, this will avoid code smell in sonar.




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

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