You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2022/08/16 16:32:00 UTC

[jira] [Updated] (RATIS-1655) Fix OrderedStreamAsync#scheduleWithTimeout to report a correct timeout value

     [ https://issues.apache.org/jira/browse/RATIS-1655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz-wo Sze updated RATIS-1655:
------------------------------
    Fix Version/s: 2.4.0

> Fix OrderedStreamAsync#scheduleWithTimeout to report a correct timeout value
> ----------------------------------------------------------------------------
>
>                 Key: RATIS-1655
>                 URL: https://issues.apache.org/jira/browse/RATIS-1655
>             Project: Ratis
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 2.3.0, 3.0.0, 2.3.1
>            Reporter: Kiyoshi Mizumaru
>            Assignee: Kiyoshi Mizumaru
>            Priority: Major
>             Fix For: 2.4.0, 3.0.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> While reading OrderedStreamAsync.java, I noticed that scheduleWithTimeout always reports the value of requestTimeout field wrapped in TimeoutIOException.
>  
> {code:java}
>   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);
>   }{code}
> I think this should be timeout, which passed in the following call:
> {code:java}
>     final boolean isClose = StandardWriteOption.CLOSE.isOneOf(request.getDataStreamRequest().getWriteOptions());
>     scheduleWithTimeout(request, isClose? closeTimeout: requestTimeout); {code}
> What do you think?
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)