Return-Path: X-Original-To: apmail-ignite-issues-archive@minotaur.apache.org Delivered-To: apmail-ignite-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 76CD418CA5 for ; Thu, 4 Feb 2016 15:03:40 +0000 (UTC) Received: (qmail 4530 invoked by uid 500); 4 Feb 2016 15:03:40 -0000 Delivered-To: apmail-ignite-issues-archive@ignite.apache.org Received: (qmail 4498 invoked by uid 500); 4 Feb 2016 15:03:40 -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 4488 invoked by uid 99); 4 Feb 2016 15:03:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2016 15:03:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C03282C044E for ; Thu, 4 Feb 2016 15:03:39 +0000 (UTC) Date: Thu, 4 Feb 2016 15:03:39 +0000 (UTC) From: "Artem Shutak (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (IGNITE-2554) Affinity.mapKeyToNode() method throw "ArithmeticException: / by zero" for LOCAL dinamically started cache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IGNITE-2554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Artem Shutak updated IGNITE-2554: --------------------------------- Summary: Affinity.mapKeyToNode() method throw "ArithmeticException: / by zero" for LOCAL dinamically started cache (was: Affinity.mapKeyToNode() method throw "ArithmeticException: / by zero" for LOCAL cache) > Affinity.mapKeyToNode() method throw "ArithmeticException: / by zero" for LOCAL dinamically started cache > --------------------------------------------------------------------------------------------------------- > > Key: IGNITE-2554 > URL: https://issues.apache.org/jira/browse/IGNITE-2554 > Project: Ignite > Issue Type: Bug > Reporter: Artem Shutak > Priority: Minor > > Affinity.mapKeyToNode() method throw "ArithmeticException: / by zero" for LOCAL cache. > The following code > {code} > public static void main(String[] args) { > try (Ignite ignite = Ignition.start(new IgniteConfiguration())) { > CacheConfiguration cc = new CacheConfiguration(); > cc.setCacheMode(LOCAL); > cc.setName("myCache"); > ignite.getOrCreateCache(cc); > ignite.affinity("myCache").mapKeyToNode("myKey"); > } > } > {code} > Produce the following exception. > {noformat} > Exception in thread "main" java.lang.ArithmeticException: / by zero > at org.apache.ignite.internal.processors.cache.affinity.GridCacheAffinityImpl.mapKeysToNodes(GridCacheAffinityImpl.java:210) > at org.apache.ignite.internal.processors.cache.affinity.GridCacheAffinityImpl.mapKeyToNode(GridCacheAffinityImpl.java:187) > at main > {noformat} > The issue is {{cctx.discovery().cacheAffinityNodes(cctx.name(), topVer)}} returns empty nodes collection. -- This message was sent by Atlassian JIRA (v6.3.4#6332)