You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vyacheslav Koptilin (Jira)" <ji...@apache.org> on 2022/09/09 17:56:00 UTC

[jira] [Commented] (IGNITE-17621) InFlightFutures does not properly register a new future which is already in completed state

    [ https://issues.apache.org/jira/browse/IGNITE-17621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17602490#comment-17602490 ] 

Vyacheslav Koptilin commented on IGNITE-17621:
----------------------------------------------

Hi [~rpuch],

Could you please take a look?

> InFlightFutures does not properly register a new future which is already in completed state
> -------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-17621
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17621
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Vyacheslav Koptilin
>            Assignee: Vyacheslav Koptilin
>            Priority: Trivial
>              Labels: ignite-3
>             Fix For: 3.0.0-alpha6
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The following method does not clean up the internal collection of futures in case the registered future was completed before calling the _registerFuture_:
> {code:java}
>     /**
>      * Registers a future in the in-flight futures collection. When it completes (either normally or exceptionally),
>      * it will be removed from the collection.
>      *
>      * @param future the future to register
>      */
>     public void registerFuture(CompletableFuture<?> future) {
>         future.whenComplete((result, ex) -> inFlightFutures.remove(future));
>         inFlightFutures.add(future);
>     }
> {code}
> The fix is quite obvious - we just need to re-order these two lines :)



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