Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2B91A200CE1 for ; Thu, 31 Aug 2017 17:00:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 29F4816AFD0; Thu, 31 Aug 2017 15:00:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 737BE16B153 for ; Thu, 31 Aug 2017 17:00:10 +0200 (CEST) Received: (qmail 11318 invoked by uid 500); 31 Aug 2017 15:00:09 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 11309 invoked by uid 99); 31 Aug 2017 15:00:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Aug 2017 15:00:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 2DAFACF119 for ; Thu, 31 Aug 2017 15:00:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id DypZJM4iiATk for ; Thu, 31 Aug 2017 15:00:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 368815FE5F for ; Thu, 31 Aug 2017 15:00:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CB31DE0E2B for ; Thu, 31 Aug 2017 15:00:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 7791A2414B for ; Thu, 31 Aug 2017 15:00:02 +0000 (UTC) Date: Thu, 31 Aug 2017 15:00:02 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 31 Aug 2017 15:00:11 -0000 [ 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() { > @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)