Description
While reading OrderedStreamAsync.java, I noticed that scheduleWithTimeout always reports the value of requestTimeout field wrapped in TimeoutIOException.
private void scheduleWithTimeout(DataStreamWindowRequest request, TimeDuration timeout) { scheduler.onTimeout(timeout, () -> { if (!request.getReplyFuture().isDone()) { request.getReplyFuture().completeExceptionally( new TimeoutIOException("Timeout " + requestTimeout + ": Failed to send " + request)); } }, LOG, () -> "Failed to completeExceptionally for " + request); }
I think this should be timeout, which passed in the following call:
final boolean isClose = StandardWriteOption.CLOSE.isOneOf(request.getDataStreamRequest().getWriteOptions()); scheduleWithTimeout(request, isClose? closeTimeout: requestTimeout);
What do you think?
Attachments
Issue Links
- links to