[jira] [Commented] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null
[ https://issues.apache.org/jira/browse/IGNITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16463798#comment-16463798 ] ASF GitHub Bot commented on IGNITE-5994: Github user SharplEr closed the pull request at: https://github.com/apache/ignite/pull/3851 > IgniteInternalCache.invokeAsync().get() can return null > --- > > Key: IGNITE-5994 > URL: https://issues.apache.org/jira/browse/IGNITE-5994 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 2.1 >Reporter: Alexander Menshikov >Assignee: Alexander Menshikov >Priority: Minor > Labels: newbie > Attachments: IgniteCacheSelfTest.java, > master_8629b50d6f_ignite-5994.patch > > > The IgniteInternalCache.invoke() always return an EntryProcessorResult, but > the IgniteInternalCache.invokeAsync().get() can return the null in case when > an EntryProcessor has returned the null. > Code from reproducer: > {noformat} > final EntryProcessor ep = new EntryProcessor Object, Object>() { > @Override > public Object process(MutableEntry entry, > Object... objects) throws EntryProcessorException { > return null; > } > }; > EntryProcessorResult result = utilCache.invoke("test", ep); > assertNotNull(result); > assertNull(result.get()); > result = utilCache.invokeAsync("test", ep).get(); > // Assert here!!! > assertNotNull(result); > assertNull(result.get()); > {noformat} > It can be optimization. Nevertheless results of invoke() must be equals with > results of invokeAsync().get(). So there are two options: > 1) To do so would be the invokeAsync(key, ep).get() returned the null too for > the optimization. > 2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult > for a logical consistency. > NOTE: Don't confuse with IgniteCache.invoke. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null
[ https://issues.apache.org/jira/browse/IGNITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16427056#comment-16427056 ] Alexander Menshikov commented on IGNITE-5994: - I gonna take Zhang Yuan's PR and bring it to merged state. > IgniteInternalCache.invokeAsync().get() can return null > --- > > Key: IGNITE-5994 > URL: https://issues.apache.org/jira/browse/IGNITE-5994 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 2.1 >Reporter: Alexander Menshikov >Assignee: Alexander Menshikov >Priority: Minor > Labels: newbie > Attachments: IgniteCacheSelfTest.java, > master_8629b50d6f_ignite-5994.patch > > > The IgniteInternalCache.invoke() always return an EntryProcessorResult, but > the IgniteInternalCache.invokeAsync().get() can return the null in case when > an EntryProcessor has returned the null. > Code from reproducer: > {noformat} > final EntryProcessor ep = new EntryProcessor Object, Object>() { > @Override > public Object process(MutableEntry entry, > Object... objects) throws EntryProcessorException { > return null; > } > }; > EntryProcessorResult result = utilCache.invoke("test", ep); > assertNotNull(result); > assertNull(result.get()); > result = utilCache.invokeAsync("test", ep).get(); > // Assert here!!! > assertNotNull(result); > assertNull(result.get()); > {noformat} > It can be optimization. Nevertheless results of invoke() must be equals with > results of invokeAsync().get(). So there are two options: > 1) To do so would be the invokeAsync(key, ep).get() returned the null too for > the optimization. > 2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult > for a logical consistency. > NOTE: Don't confuse with IgniteCache.invoke. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null
[ https://issues.apache.org/jira/browse/IGNITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16256549#comment-16256549 ] Alexander Menshikov commented on IGNITE-5994: - [~shia] You has formed the patch in wrong way. You need to create a PR on GitHub and create a upsource review. Please see HowToContribute page: https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-Workflow Sorry for a slow answering. Also, I have to say I haven't merge permission so you will have to ask about merge on dev-list. > IgniteInternalCache.invokeAsync().get() can return null > --- > > Key: IGNITE-5994 > URL: https://issues.apache.org/jira/browse/IGNITE-5994 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 2.1 >Reporter: Alexander Menshikov >Assignee: Zhang Yuan >Priority: Minor > Labels: newbie > Attachments: IgniteCacheSelfTest.java, > master_8629b50d6f_ignite-5994.patch > > > The IgniteInternalCache.invoke() always return an EntryProcessorResult, but > the IgniteInternalCache.invokeAsync().get() can return the null in case when > an EntryProcessor has returned the null. > Code from reproducer: > {noformat} > final EntryProcessor ep = new EntryProcessor Object, Object>() { > @Override > public Object process(MutableEntry entry, > Object... objects) throws EntryProcessorException { > return null; > } > }; > EntryProcessorResult result = utilCache.invoke("test", ep); > assertNotNull(result); > assertNull(result.get()); > result = utilCache.invokeAsync("test", ep).get(); > // Assert here!!! > assertNotNull(result); > assertNull(result.get()); > {noformat} > It can be optimization. Nevertheless results of invoke() must be equals with > results of invokeAsync().get(). So there are two options: > 1) To do so would be the invokeAsync(key, ep).get() returned the null too for > the optimization. > 2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult > for a logical consistency. > NOTE: Don't confuse with IgniteCache.invoke. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null
[ https://issues.apache.org/jira/browse/IGNITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16149095#comment-16149095 ] ASF GitHub Bot commented on IGNITE-5994: GitHub user shia86 opened a pull request: https://github.com/apache/ignite/pull/2569 IGNITE-5994 Implemented. You can merge this pull request into a Git repository by running: $ git pull https://github.com/shia86/ignite ignite-5994 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ignite/pull/2569.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 #2569 commit 1472304fe29e4dabab43bccf849bc3832811638d Author: Zhang Yuan Date: 2017-08-14T03:38:25Z IGNITE-5994 Implemented. > IgniteInternalCache.invokeAsync().get() can return null > --- > > Key: IGNITE-5994 > URL: https://issues.apache.org/jira/browse/IGNITE-5994 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 2.1 >Reporter: Alexander Menshikov >Assignee: Zhang Yuan >Priority: Minor > Labels: newbie > Attachments: IgniteCacheSelfTest.java, > master_8629b50d6f_ignite-5994.patch > > > The IgniteInternalCache.invoke() always return an EntryProcessorResult, but > the IgniteInternalCache.invokeAsync().get() can return the null in case when > an EntryProcessor has returned the null. > Code from reproducer: > {noformat} > final EntryProcessor ep = new EntryProcessor Object, Object>() { > @Override > public Object process(MutableEntry entry, > Object... objects) throws EntryProcessorException { > return null; > } > }; > EntryProcessorResult result = utilCache.invoke("test", ep); > assertNotNull(result); > assertNull(result.get()); > result = utilCache.invokeAsync("test", ep).get(); > // Assert here!!! > assertNotNull(result); > assertNull(result.get()); > {noformat} > It can be optimization. Nevertheless results of invoke() must be equals with > results of invokeAsync().get(). So there are two options: > 1) To do so would be the invokeAsync(key, ep).get() returned the null too for > the optimization. > 2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult > for a logical consistency. > NOTE: Don't confuse with IgniteCache.invoke. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null
[ https://issues.apache.org/jira/browse/IGNITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16143669#comment-16143669 ] Anton Vinogradov commented on IGNITE-5994: -- [~shia], now you should be able to assign issue to yourself. > IgniteInternalCache.invokeAsync().get() can return null > --- > > Key: IGNITE-5994 > URL: https://issues.apache.org/jira/browse/IGNITE-5994 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 2.1 >Reporter: Alexander Menshikov >Priority: Minor > Labels: newbie > Attachments: IgniteCacheSelfTest.java > > > The IgniteInternalCache.invoke() always return an EntryProcessorResult, but > the IgniteInternalCache.invokeAsync().get() can return the null in case when > an EntryProcessor has returned the null. > Code from reproducer: > {noformat} > final EntryProcessor ep = new EntryProcessor Object, Object>() { > @Override > public Object process(MutableEntry entry, > Object... objects) throws EntryProcessorException { > return null; > } > }; > EntryProcessorResult result = utilCache.invoke("test", ep); > assertNotNull(result); > assertNull(result.get()); > result = utilCache.invokeAsync("test", ep).get(); > // Assert here!!! > assertNotNull(result); > assertNull(result.get()); > {noformat} > It can be optimization. Nevertheless results of invoke() must be equals with > results of invokeAsync().get(). So there are two options: > 1) To do so would be the invokeAsync(key, ep).get() returned the null too for > the optimization. > 2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult > for a logical consistency. > NOTE: Don't confuse with IgniteCache.invoke. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null
[ https://issues.apache.org/jira/browse/IGNITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16129813#comment-16129813 ] Zhang Yuan commented on IGNITE-5994: [~sharpler] I have asked for permission in dev-list and got reply that I have been add to the list. > IgniteInternalCache.invokeAsync().get() can return null > --- > > Key: IGNITE-5994 > URL: https://issues.apache.org/jira/browse/IGNITE-5994 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 2.1 >Reporter: Alexander Menshikov >Priority: Minor > Labels: newbie > Attachments: IgniteCacheSelfTest.java > > > The IgniteInternalCache.invoke() always return an EntryProcessorResult, but > the IgniteInternalCache.invokeAsync().get() can return the null in case when > an EntryProcessor has returned the null. > Code from reproducer: > {noformat} > final EntryProcessor ep = new EntryProcessor Object, Object>() { > @Override > public Object process(MutableEntry entry, > Object... objects) throws EntryProcessorException { > return null; > } > }; > EntryProcessorResult result = utilCache.invoke("test", ep); > assertNotNull(result); > assertNull(result.get()); > result = utilCache.invokeAsync("test", ep).get(); > // Assert here!!! > assertNotNull(result); > assertNull(result.get()); > {noformat} > It can be optimization. Nevertheless results of invoke() must be equals with > results of invokeAsync().get(). So there are two options: > 1) To do so would be the invokeAsync(key, ep).get() returned the null too for > the optimization. > 2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult > for a logical consistency. > NOTE: Don't confuse with IgniteCache.invoke. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null
[ https://issues.apache.org/jira/browse/IGNITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16127249#comment-16127249 ] Alexander Menshikov commented on IGNITE-5994: - [~shia] I can't. You need to ask for permission in dev-list first. > IgniteInternalCache.invokeAsync().get() can return null > --- > > Key: IGNITE-5994 > URL: https://issues.apache.org/jira/browse/IGNITE-5994 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 2.1 >Reporter: Alexander Menshikov >Priority: Minor > Labels: newbie > Attachments: IgniteCacheSelfTest.java > > > The IgniteInternalCache.invoke() always return an EntryProcessorResult, but > the IgniteInternalCache.invokeAsync().get() can return the null in case when > an EntryProcessor has returned the null. > Code from reproducer: > {noformat} > final EntryProcessor ep = new EntryProcessor Object, Object>() { > @Override > public Object process(MutableEntry entry, > Object... objects) throws EntryProcessorException { > return null; > } > }; > EntryProcessorResult result = utilCache.invoke("test", ep); > assertNotNull(result); > assertNull(result.get()); > result = utilCache.invokeAsync("test", ep).get(); > // Assert here!!! > assertNotNull(result); > assertNull(result.get()); > {noformat} > It can be optimization. Nevertheless results of invoke() must be equals with > results of invokeAsync().get(). So there are two options: > 1) To do so would be the invokeAsync(key, ep).get() returned the null too for > the optimization. > 2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult > for a logical consistency. > NOTE: Don't confuse with IgniteCache.invoke. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null
[ https://issues.apache.org/jira/browse/IGNITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16127034#comment-16127034 ] Zhang Yuan commented on IGNITE-5994: [ ~sharpler] I would like to be work on this issue. Please assigned it to me > IgniteInternalCache.invokeAsync().get() can return null > --- > > Key: IGNITE-5994 > URL: https://issues.apache.org/jira/browse/IGNITE-5994 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 2.1 >Reporter: Alexander Menshikov >Priority: Minor > Labels: newbie > Attachments: IgniteCacheSelfTest.java > > > The IgniteInternalCache.invoke() always return an EntryProcessorResult, but > the IgniteInternalCache.invokeAsync().get() can return the null in case when > an EntryProcessor has returned the null. > Code from reproducer: > {noformat} > final EntryProcessor ep = new EntryProcessor Object, Object>() { > @Override > public Object process(MutableEntry entry, > Object... objects) throws EntryProcessorException { > return null; > } > }; > EntryProcessorResult result = utilCache.invoke("test", ep); > assertNotNull(result); > assertNull(result.get()); > result = utilCache.invokeAsync("test", ep).get(); > // Assert here!!! > assertNotNull(result); > assertNull(result.get()); > {noformat} > It can be optimization. Nevertheless results of invoke() must be equals with > results of invokeAsync().get(). So there are two options: > 1) To do so would be the invokeAsync(key, ep).get() returned the null too for > the optimization. > 2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult > for a logical consistency. > NOTE: Don't confuse with IgniteCache.invoke. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null
[ https://issues.apache.org/jira/browse/IGNITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119890#comment-16119890 ] Yakov Zhdanov commented on IGNITE-5994: --- [~avinogradov] [~sharpler], now I see. That's definitely a bug. If return type is Future then it should return object of type returned by an entry processor. > IgniteInternalCache.invokeAsync().get() can return null > --- > > Key: IGNITE-5994 > URL: https://issues.apache.org/jira/browse/IGNITE-5994 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 2.1 >Reporter: Alexander Menshikov >Priority: Minor > Labels: newbie > Attachments: IgniteCacheSelfTest.java > > > The IgniteInternalCache.invoke() always return an EntryProcessorResult, but > the IgniteInternalCache.invokeAsync().get() can return the null in case when > an EntryProcessor has returned the null. > Code from reproducer: > {noformat} > final EntryProcessor ep = new EntryProcessor Object, Object>() { > @Override > public Object process(MutableEntry entry, > Object... objects) throws EntryProcessorException { > return null; > } > }; > EntryProcessorResult result = utilCache.invoke("test", ep); > assertNotNull(result); > assertNull(result.get()); > result = utilCache.invokeAsync("test", ep).get(); > // Assert here!!! > assertNotNull(result); > assertNull(result.get()); > {noformat} > It can be optimization. Nevertheless results of invoke() must be equals with > results of invokeAsync().get(). So there are two options: > 1) To do so would be the invokeAsync(key, ep).get() returned the null too for > the optimization. > 2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult > for a logical consistency. > NOTE: Don't confuse with IgniteCache.invoke. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null
[ https://issues.apache.org/jira/browse/IGNITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119754#comment-16119754 ] Anton Vinogradov commented on IGNITE-5994: -- [~yzhdanov], Currently, {{IgniteCache.invokeAsync()}} is defined as {{ IgniteFuture invokeAsync(...)}}, but {{IgniteInternalCache.invokeAsync()}} is defined as {{ IgniteInternalFuture> invokeAsync(...)}} and question about second one. When {{EntryProcessor}} returns {{null}} we will gain {{null}} at {{invokeAsync(...).get()}}, But when it returns {{not null}} we will gain {{EntryProcessorResult}} instance at {{invokeAsync("test", ep).get()}} So, the question is, is it optimization or bug? > IgniteInternalCache.invokeAsync().get() can return null > --- > > Key: IGNITE-5994 > URL: https://issues.apache.org/jira/browse/IGNITE-5994 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 2.1 >Reporter: Alexander Menshikov >Priority: Minor > Labels: newbie > Attachments: IgniteCacheSelfTest.java > > > The IgniteInternalCache.invoke() always return an EntryProcessorResult, but > the IgniteInternalCache.invokeAsync().get() can return the null in case when > an EntryProcessor has returned the null. > Code from reproducer: > {noformat} > final EntryProcessor ep = new EntryProcessor Object, Object>() { > @Override > public Object process(MutableEntry entry, > Object... objects) throws EntryProcessorException { > return null; > } > }; > EntryProcessorResult result = utilCache.invoke("test", ep); > assertNotNull(result); > assertNull(result.get()); > result = utilCache.invokeAsync("test", ep).get(); > // Assert here!!! > assertNotNull(result); > assertNull(result.get()); > {noformat} > It can be optimization. Nevertheless results of invoke() must be equals with > results of invokeAsync().get(). So there are two options: > 1) To do so would be the invokeAsync(key, ep).get() returned the null too for > the optimization. > 2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult > for a logical consistency. > NOTE: Don't confuse with IgniteCache.invoke. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null
[ https://issues.apache.org/jira/browse/IGNITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119676#comment-16119676 ] Yakov Zhdanov commented on IGNITE-5994: --- Currently {{invokeAsync()}} is defined as {{public IgniteFuture invokeAsync(.)}}. If we need EntryProcessorResult to be returned from Future then it should be {{public IgniteFuture> invokeAsync(.)}}. I am not sure why we have this difference in sync/async counterpart. Probably, [~vozerov] or [~tledkov-gridgain] can provide some info. I also think that we will not changing the public API in 2.0. Let's leave it as is and then fix in next major version. > IgniteInternalCache.invokeAsync().get() can return null > --- > > Key: IGNITE-5994 > URL: https://issues.apache.org/jira/browse/IGNITE-5994 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 2.1 >Reporter: Alexander Menshikov >Priority: Minor > Labels: newbie > Attachments: IgniteCacheSelfTest.java > > > The IgniteInternalCache.invoke() always return an EntryProcessorResult, but > the IgniteInternalCache.invokeAsync().get() can return the null in case when > an EntryProcessor has returned the null. > Code from reproducer: > {noformat} > final EntryProcessor ep = new EntryProcessor Object, Object>() { > @Override > public Object process(MutableEntry entry, > Object... objects) throws EntryProcessorException { > return null; > } > }; > EntryProcessorResult result = utilCache.invoke("test", ep); > assertNotNull(result); > assertNull(result.get()); > result = utilCache.invokeAsync("test", ep).get(); > // Assert here!!! > assertNotNull(result); > assertNull(result.get()); > {noformat} > It can be optimization. Nevertheless results of invoke() must be equals with > results of invokeAsync().get(). So there are two options: > 1) To do so would be the invokeAsync(key, ep).get() returned the null too for > the optimization. > 2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult > for a logical consistency. > NOTE: Don't confuse with IgniteCache.invoke. -- This message was sent by Atlassian JIRA (v6.4.14#64029)