You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "David Harvey (JIRA)" <ji...@apache.org> on 2018/04/26 20:16:00 UTC

[jira] [Comment Edited] (IGNITE-8406) Update IgniteDataStreamer.flush() javadoc

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

David Harvey edited comment on IGNITE-8406 at 4/26/18 8:15 PM:
---------------------------------------------------------------

I believe that the code will throw a {{CacheException as described, except I think there is a small window where it will not.}}
 * DataStreamerImpl.flush() calls EnterBusy while activeFuts is non empty.  This seems to be the last test of "cancelled" in EnterBusy.   If there were exceptional completions before this, flush() will throw due to the code in EnterBusy().
 * Before doFlush() looks at activeFuts, activeFuts becomes empty because a buffer asynchronously had an exceptional completion.  Because activeFuts is empty, doFlush and flush will return without an exception, even though some futures previously returned by addData() have had exceptions thrown.

In addition to the documentation change, an inelegant fix would be to call "EnterBusy();leaveBusy();" at the end of flush()


was (Author: syssoftsol):
I believe that the code will throw a throw {{CacheException as described, except I think there is a small window where it will not.}}
 * DataStreamerImpl.flush() calls EnterBusy while activeFuts is non empty.  This seems to be the last test of "cancelled" in EnterBusy.   If there were exceptional completions before this, flush() will throw due to the code in EnterBusy().
 * Before doFlush() looks at activeFuts, activeFuts becomes empty because a buffer asynchronously had an exceptional completion.  Because activeFuts is empty, doFlush and flush will return without an exception, even though some futures previously returned by addData() have had exceptions thrown.

In addition to the documentation change, an inelegant fix would be to call "EnterBusy();leaveBusy();" at the end of flush()

> Update IgniteDataStreamer.flush() javadoc
> -----------------------------------------
>
>                 Key: IGNITE-8406
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8406
>             Project: Ignite
>          Issue Type: Task
>          Components: streaming
>    Affects Versions: 2.4
>            Reporter: Andrey Kuznetsov
>            Priority: Minor
>             Fix For: 2.6
>
>
> Current {{flush()}} implementation can throw {{CacheException}} if one or more futures previously returned by {{addData()}} have been completed exceptionally. This behavior should be described in {{IgniteDataStreamer}} javadoc.



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