Return-Path: X-Original-To: apmail-ignite-user-archive@minotaur.apache.org Delivered-To: apmail-ignite-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 65709186FF for ; Sun, 6 Mar 2016 18:01:14 +0000 (UTC) Received: (qmail 89825 invoked by uid 500); 6 Mar 2016 18:01:14 -0000 Delivered-To: apmail-ignite-user-archive@ignite.apache.org Received: (qmail 89784 invoked by uid 500); 6 Mar 2016 18:01:14 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 89774 invoked by uid 99); 6 Mar 2016 18:01:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Mar 2016 18:01:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id CC48B1A02CC for ; Sun, 6 Mar 2016 18:01:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.919 X-Spam-Level: X-Spam-Status: No, score=0.919 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_FAIL=0.919] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ulPkMZVtklcO for ; Sun, 6 Mar 2016 18:01:09 +0000 (UTC) Received: from mbob.nabble.com (mbob.nabble.com [162.253.133.15]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 898765F645 for ; Sun, 6 Mar 2016 18:01:08 +0000 (UTC) Received: from malf.nabble.com (unknown [162.253.133.59]) by mbob.nabble.com (Postfix) with ESMTP id A995A224E90F for ; Sun, 6 Mar 2016 09:52:28 -0800 (PST) Date: Sun, 6 Mar 2016 09:48:34 -0800 (PST) From: techbysample To: user@ignite.apache.org Message-ID: <1457286514753-3379.post@n6.nabble.com> Subject: IniteCache: How to ensure cache is 'rebalanced' when a node leaves topology? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Forum, Background: I started an IgniteCache using the following configuration: Ignition.setClientMode(true); try (Ignite ignite = Ignition.start()) { CacheConfiguration cacheCfg = new CacheConfiguration<>("myCacheName"); cacheCfg.setAtomicityMode(TRANSACTIONAL); cacheCfg.setCacheMode(CacheMode.PARTITIONED); cacheCfg.setRebalanceMode(CacheRebalanceMode.SYNC); cacheCfg.setStatisticsEnabled(true); IgniteCache cache = ignite.cache("myCacheName"); // Store keys in cache for (int i = 0; i < 10; i++) cache.put(i, Integer.toString(i)); for (int i = 0; i < 10; i++) System.out.println("Got [key=" + i + ", val=" + cache.get(i) + ']'); } For my example, In my topology I expect to have 1 client node and 2 server nodes. I expect a total of 10 keys/values. Question: I noticed that when I start with 1 client and 1 server, cache is re-balanced when 2nd server nodes joins. However, when 1 server node shuts down, leaving only 1 remaining server node, cache is not re-balanced. As a result, the node that was shut down had 4 keys/values. The remaining node has only 6 keys/values. It is my expectation that the remaining server node would have 10 key/values. Correct? Please advise on how to ensure IgniteCache is re-balanced when node leaves topology to have a total of 10 keys/values? Thank you in advance. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IniteCache-How-to-ensure-cache-is-rebalanced-when-a-node-leaves-topology-tp3379.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.