acrites commented on code in PR #41822:
URL: https://github.com/apache/beam/pull/41822#discussion_r4747497073
##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/StateFetchingIterators.java:
##########
@@ -623,7 +622,7 @@ public boolean isReady() {
currentCachedBlockValueIndex = 0;
} else {
// If not found, then we need to load it.
- return false;
+ return underlyingStateFetchingIterator.isReady();
Review Comment:
Done. Also added unit tests for this.
##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/StateFetchingIterators.java:
##########
@@ -603,8 +603,7 @@ public boolean isReady() {
@Nullable Blocks<T> existing = cache.peek(IterableCacheKey.INSTANCE);
boolean isFirstBlock = ByteString.EMPTY.equals(nextToken);
if (existing == null) {
- // If there is nothing cached and we are on the first block then
we are not ready.
- return false;
+ return underlyingStateFetchingIterator.isReady();
Review Comment:
Done. Also added unit tests for this.
--
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]