Return-Path: X-Original-To: apmail-ignite-dev-archive@minotaur.apache.org Delivered-To: apmail-ignite-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ED77F1886B for ; Mon, 30 Nov 2015 10:11:16 +0000 (UTC) Received: (qmail 21044 invoked by uid 500); 30 Nov 2015 10:11:16 -0000 Delivered-To: apmail-ignite-dev-archive@ignite.apache.org Received: (qmail 20992 invoked by uid 500); 30 Nov 2015 10:11:16 -0000 Mailing-List: contact dev-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 dev@ignite.apache.org Received: (qmail 20960 invoked by uid 99); 30 Nov 2015 10:11:16 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Nov 2015 10:11:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 04B01C0FF5 for ; Mon, 30 Nov 2015 10:11:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.898 X-Spam-Level: ** X-Spam-Status: No, score=2.898 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id KxRunOwf5pxI for ; Mon, 30 Nov 2015 10:11:15 +0000 (UTC) Received: from mail-yk0-f171.google.com (mail-yk0-f171.google.com [209.85.160.171]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 40EB520270 for ; Mon, 30 Nov 2015 10:11:14 +0000 (UTC) Received: by ykdr82 with SMTP id r82so177114120ykd.3 for ; Mon, 30 Nov 2015 02:11:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=mrM/yAZimMM41Gqs6yZ4HSzR4SzVx5XN7aYK6IddfQI=; b=X264QTE64SPkz9iffIGag7JGtoyO/M4kgeB+Tp3gHHMlJsChWwc0IeydoxTJdZjukm hJyRRBegUQORCG0sHComaAkOfsHaeYuFdNxO07bStCbx6m8GlAICvAp4yvKClkDsVSIp 8KYzzLOyYez1golQE8raBZfPpxn6QmAYdxj4zAlRiKglvM0n6zntYNdWtTloM7ZcphMv h1BkwE2Fv91I7Za9QKf1V8yVikmw6L0ZGqfovrsDowfj3GwY7Fl0/cJRc/8MmajcLvZP OuKYcLI3JfKV5RvP4XpjJJb40WDfhH09V3rtzG3Wt2nplqLM6hj6dO6CjHF7POuDQbu5 W6og== MIME-Version: 1.0 X-Received: by 10.13.241.199 with SMTP id a190mr51184206ywf.296.1448878273214; Mon, 30 Nov 2015 02:11:13 -0800 (PST) Received: by 10.13.215.66 with HTTP; Mon, 30 Nov 2015 02:11:13 -0800 (PST) In-Reply-To: References: Date: Mon, 30 Nov 2015 13:11:13 +0300 Message-ID: Subject: Re: EntryProcessor execution semantics From: Alexey Goncharuk To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=94eb2c032720cc42b80525bf42f1 --94eb2c032720cc42b80525bf42f1 Content-Type: text/plain; charset=UTF-8 Andrey, If I leave behind my knowledge about Ignite internals, my expectation would be that an EntryProcessor is invoked on all affinity - both primary and backup - nodes in the grid. The main reason behind this expectation is that usually a serialized EntryProcessor instance is smaller than resulting object being stored in the cache, so sending a serialized EntryProcessor should be cheaper. Is there a specific reason you expect an EntryProcessor to be called only once across all the nodes? I would not imply any restrictions on how many times an EntryProcessor is called during a cache update. For example, in a case of explicit optimistic READ_COMMITTED transaction it may be called more than once because Ignite needs to calculate a return value for the first invoke() and then it should be called second time during commit when transactional locks are held. Current requirement is that an EntryProcessor should be a stateless function, and it may be called more than once (but of course it will receive the same cache value every time). I agree that this should be properly articulated in the documentation, I will make sure that it will be reflected in the forthcoming 1.5 release javadocs. --94eb2c032720cc42b80525bf42f1--