jojochuang commented on code in PR #10071:
URL: https://github.com/apache/ozone/pull/10071#discussion_r3076332913


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/StreamBlockInputStream.java:
##########
@@ -225,12 +227,36 @@ public synchronized void unbuffer() {
   }
 
   private synchronized void closeStream() {
-    if (streamingReader != null) {
-      LOG.debug("Closing {}", streamingReader);
-      streamingReader.onCompleted();
-      streamingReader = null;
+    if (streamingReader == null) {
+      buffer = null;
+      return;
     }
+
+    final StreamingReader reader = streamingReader;
+    streamingReader = null;

Review Comment:
   this is unnecessary since the method is synchronized. Can simply update 
streamingReader = null at the end.



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