foreverneverer commented on code in PR #1019:
URL: https://github.com/apache/incubator-pegasus/pull/1019#discussion_r907215778


##########
java-client/src/main/java/org/apache/pegasus/client/PegasusScanner.java:
##########
@@ -88,9 +88,31 @@ public PegasusScanner(
     _needCheckHash = needCheckHash;
     _incomplete = false;
     _fullScan = fullScan;
+    _nextItem = null;
+  }
+
+  public boolean hasNext() throws PException {
+    synchronized (_nextItemLock) {
+      if (_incomplete) {
+        return false;
+      }
+      if (_rpcRunning && !_encounterError) {
+        return !_promises.isEmpty();

Review Comment:
   `_promises.isEmpty()` but just because the running rpc has't completed. that 
is to say, when the rpc compeleted, the `_promises` is not empty.
   
   The above case has problem? 



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