ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitriy Setrakyan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-7963) Futures from DataStreamer.addData() fail to complete if DataStreamer.flush() is never called
Date Thu, 15 Mar 2018 12:50:00 GMT

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

Dmitriy Setrakyan commented on IGNITE-7963:
-------------------------------------------

Not sure if this is an issue at all. You must close data streamer after opening one. The closing
of the data streamer should call flush, which means that the futures will complete.

> Futures from DataStreamer.addData() fail to complete if DataStreamer.flush() is never
called
> --------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-7963
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7963
>             Project: Ignite
>          Issue Type: Improvement
>          Components: cache
>    Affects Versions: 2.3
>            Reporter: Ilya Kasnacheev
>            Assignee: Ilya Kasnacheev
>            Priority: Minor
>              Labels: usability
>
> DataStreamer.addData() will return futures for operation.
> Thus the naive use of DataStreamer will look like this:
> {code}
> for (Data d : data)
>      futs.add(dataStreamer.addData(d));
> for (IgniteFuture f : futs)
>     f.get();
> dataStreamer.close();
> {code}
> However, this does not work. Unless flush is called (manual or otherwisE), futures are
not being processed. This code will likely hang on f.get().
> The solution, IMHO, is to introduce dataStreamer-flushing clause in f.get().



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message