LEEKYE commented on code in PR #37691:
URL: https://github.com/apache/beam/pull/37691#discussion_r2880569618


##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/StateFetchingIterators.java:
##########
@@ -677,6 +683,15 @@ static class LazyBlockingStateFetchingIterator implements 
PrefetchableIterator<B
       this.continuationToken = 
stateRequestForFirstChunk.getGet().getContinuationToken();
     }
 
+    LazyBlockingStateFetchingIterator(
+        BeamFnStateClient beamFnStateClient,
+        StateRequest stateRequestForFirstChunk,
+        boolean hasNoState) {
+      this.beamFnStateClient = beamFnStateClient;
+      this.stateRequestForFirstChunk = stateRequestForFirstChunk;
+      this.continuationToken = hasNoState ? null : 
stateRequestForFirstChunk.getGet().getContinuationToken();

Review Comment:
   I am not super familiar with this, but if I understand correctly, 
'hasNoState' indicates whether StateGetRequest will be constructed and 
processed, or just skipped to improve performance. And if StateGetRequest is 
processed to bring in the actual states, it does not make sense to plumb the 
'hasNoState' field



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

Reply via email to