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

ASF GitHub Bot commented on IGNITE-7963:
----------------------------------------

GitHub user alamar opened a pull request:

    https://github.com/apache/ignite/pull/3651

    IGNITE-7963 Opportunistically flush DataStreamer instead of endless w…

    …ait.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gridgain/apache-ignite ignite-7963

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/3651.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3651
    
----
commit 060b0973ae6d93b46a590b9958c14134c098d9f6
Author: Ilya Kasnacheev <ilya.kasnacheev@...>
Date:   2018-03-16T15:43:52Z

    IGNITE-7963 Opportunistically flush DataStreamer instead of endless wait.

----


> 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)

Reply via email to