You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ilya Kasnacheev (JIRA)" <ji...@apache.org> on 2018/03/16 15:39:00 UTC
[jira] [Comment Edited] (IGNITE-7963) Futures from
DataStreamer.addData() fail to complete if DataStreamer.flush() is never
called
[ https://issues.apache.org/jira/browse/IGNITE-7963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16402065#comment-16402065 ]
Ilya Kasnacheev edited comment on IGNITE-7963 at 3/16/18 3:38 PM:
------------------------------------------------------------------
[~dsetrakyan] not if you are waiting for futures before closing data streamer. I don't think there's anything in javadocs to mandate such behaviour.
Maybe we should update javadocs instead?
was (Author: ilyak):
[~dsetrakyan] not if you are waiting for futures before closing data streamer. I don't think there's anything in javadocs to mandate such behaviour.
> 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)