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 EF019200B0F for ; Thu, 2 Jun 2016 18:02:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EBF04160A51; Thu, 2 Jun 2016 16:02:00 +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 40BE2160A52 for ; Thu, 2 Jun 2016 18:02:00 +0200 (CEST) Received: (qmail 2853 invoked by uid 500); 2 Jun 2016 16:01:59 -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 2797 invoked by uid 99); 2 Jun 2016 16:01:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jun 2016 16:01:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 3FA162C1F5D for ; Thu, 2 Jun 2016 16:01:59 +0000 (UTC) Date: Thu, 2 Jun 2016 16:01:59 +0000 (UTC) From: "Dmitriy Setrakyan (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (IGNITE-3222) IgniteCache.invokeAll for all cache entries MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 02 Jun 2016 16:02:01 -0000 [ https://issues.apache.org/jira/browse/IGNITE-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15312537#comment-15312537 ] Dmitriy Setrakyan edited comment on IGNITE-3222 at 6/2/16 4:01 PM: ------------------------------------------------------------------- _> But dealing with partitions manually is also error-prone and not obvious at all. Invoke over all cache entries is a simple common task, why not provide a simple method of doing it?_ I don't think it is a common task at all. On top of that, if partition-based affinityCall/Run can achieve the same goal, I don't see a need for an additional API that can do the same thing. I am also, generally, against having methods that can potentially return the whole cache to the client side. _> What kind of memory issues do you expect? Returning EntryProcessorResult for each entry on a huge cache is an obvious problem, same as calling getAll on QueryCursor, for example. We can't protect users from such things._ It is not the same as {{getAll(..)}}. User must pass the keys into {{getAll(...)}} method and is aware how many entries will be returned. In this case, you can get millions of entries back, which will certainly cause memory issues. To do this right, we have to paginate the result, which will complicate the API and the overall implementation of this task. was (Author: dsetrakyan): > But dealing with partitions manually is also error-prone and not obvious at all. Invoke over all cache entries is a simple common task, why not provide a simple method of doing it? I don't think it is a common task at all. On top of that, if partition-based affinityCall/Run can achieve the same goal, I don't see a need for an additional API that can do the same thing. I am also, generally, against having methods that can potentially return the whole cache to the client side. > What kind of memory issues do you expect? Returning EntryProcessorResult for each entry on a huge cache is an obvious problem, same as calling getAll on QueryCursor, for example. We can't protect users from such things. It is not the same as {{getAll(..)}}. User must pass the keys into {{getAll(...)}} method and is aware how many entries will be returned. In this case, you can get millions of entries back, which will certainly cause memory issues. To do this right, we have to paginate the result, which will complicate the API and the overall implementation of this task. > IgniteCache.invokeAll for all cache entries > ------------------------------------------- > > Key: IGNITE-3222 > URL: https://issues.apache.org/jira/browse/IGNITE-3222 > Project: Ignite > Issue Type: Task > Components: cache > Affects Versions: 1.1.4 > Reporter: Pavel Tupitsyn > Fix For: 1.7 > > > Implement an invokeAll overload that processes all cache keys (not some specific set). > Proposed signature: > {code} > public void invokeAll(CacheEntryProcessor entryProcessor, Object... args); > public Map> invokeAll(CacheEntryProcessor entryProcessor, boolean returnAffectedOnly, Object... args); > {code} > This will apply the specified processor to all cache entries. > First method does not return anything. > Second method either returns all results for all entries, or only for entries that have been changed by the processor in any way. -- This message was sent by Atlassian JIRA (v6.3.4#6332)