lidavidm commented on a change in pull request #7012:
URL: https://github.com/apache/arrow/pull/7012#discussion_r417290704



##########
File path: 
java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightStream.java
##########
@@ -170,21 +182,17 @@ public void close() throws Exception {
    */
   public boolean next() {
     try {
-      // make sure we have the root
-      root.get().clear();
-
-      if (completed && queue.isEmpty()) {
+      if (completed.isDone() && queue.isEmpty()) {
         return false;
       }
 
-
       pending--;
       requestOutstanding();
 
       Object data = queue.take();
       if (DONE == data) {
         queue.put(DONE);
-        completed = true;
+        completed.complete(null);

Review comment:
       Ah, this is a `CompletableFuture<Void>`, which I clarified in a comment.




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


Reply via email to