smjn opened a new pull request, #17772:
URL: https://github.com/apache/kafka/pull/17772

   * Currently, we are fetching results from futures using `future.get()` calls 
in `DefaultStatePersister`. This may cause subtle issues resulting in hanging 
tests.
   * In this PR, the issue is resolved by replacing `get()` calls with 
`get(timeout)`. In the concerned code, the futures are already completed when 
this call is being made as the futures are combined using `allOf` and then 
passed to `thenApply`. Hence, we are using `0` value for the timeout and not 
going for `getNow` since the exception block same as for `InterruptedException` 
and `ExecutionException` thus promoting code-reuse.
   * Few new tests have been added to `DefaultStatePersisterTest` to test 
various cases of extracting results from the futures - taking care of 
exceptional cases.


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