acrites opened a new pull request, #40825:
URL: https://github.com/apache/beam/pull/40825

   In `CachingStateIterable`, `remove()` and `appendHelper()` detect when the 
cache is only partially loaded (`nextToken != null`) and call 
`cache.remove(IterableCacheKey.INSTANCE)`. However, without returning early, 
execution falls through to the block combination logic which stores a 
`MutatedBlocks` with `nextToken = null`, overwriting the cache with truncated 
contents.
   
   This PR adds the missing `return;` statements after `cache.remove(...)` so 
that the cache remains evicted and subsequent iterations fetch the full, 
correct dataset from the runner. It also updates `testAppend` and `testRemove` 
in `StateFetchingIteratorsTest` with explanatory comments ensuring the partial 
cache condition is properly triggered before mutations occur.
   


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