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


##########
java-client/src/main/java/org/apache/pegasus/client/PegasusScanner.java:
##########
@@ -88,9 +88,27 @@ public PegasusScanner(
     _needCheckHash = needCheckHash;
     _incomplete = false;
     _fullScan = fullScan;
+    _nextItem = null;

Review Comment:
   The global variable will cause `thread-safe` problem,  in origin code, I 
remember it will `lock` before fetch `next`: 
https://github.com/WHBANG/incubator-pegasus/blob/bd099a9c963de8de4cd8ad4c80ca6bb9653d24cd/java-client/src/main/java/org/apache/pegasus/client/PegasusScanner.java#L125
   
   Please check and make sure the `refactor` is `thread-safe`



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