[
https://issues.apache.org/jira/browse/IGNITE-17621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17602975#comment-17602975
]
Roman Puchkovskiy edited comment on IGNITE-17621 at 9/12/22 7:46 AM:
---------------------------------------------------------------------
The patch looks good to me, thanks for the fix!
was (Author: rpuch):
The patch looks good for me, thanks for the fix!
> 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: 0.5h
> 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)