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

   ## Description
   When `LazyBlockingStateFetchingIterator.seekToContinuationToken()` is called 
with a different continuation token, `prefetchedResponse` was discarded by 
simply setting the reference to `null`. If a prefetch `StateRequest` RPC was 
still in flight, its `CompletableFuture` was never cancelled and continued 
running in the background (for instance, when `CachingStateIterator.isReady()` 
repositions `underlyingStateFetchingIterator` past stale prefetched chunks).
   
   This PR cancels any non-null `prefetchedResponse` via `cancel(true)` before 
clearing it, and adds 
`LazyBlockingStateFetchingIteratorTest.testSeekCancelsInFlightPrefetch` to 
verify cancellation.


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

  • [PR] [Java] Cancel in-flight p... acrites (via GitHub) via github

Reply via email to