Artem Shutak created IGNITE-2554:
------------------------------------ Summary: Affinity.mapKeyToNode() method throw "ArithmeticException: / by zero" for LOCAL 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) |
Hi Artem Shutak ,
*Does this issue easy to reproduce? As I would like to work on it.* Thanks, kcheng On Thu, Feb 4, 2016 at 10:56 PM, Artem Shutak (JIRA) <[hidden email]> wrote: > Artem Shutak created IGNITE-2554: > ------------------------------------ > > Summary: Affinity.mapKeyToNode() method throw > "ArithmeticException: / by zero" for LOCAL 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) > |
fall into newbie tag? as I am a newbie to ignite. 😁
Thanks, kcheng On Thu, Feb 4, 2016 at 11:10 PM, Ken Cheng <[hidden email]> wrote: > Hi Artem Shutak , > > *Does this issue easy to reproduce? As I would like to work on it.* > > > > > Thanks, > kcheng > > On Thu, Feb 4, 2016 at 10:56 PM, Artem Shutak (JIRA) <[hidden email]> > wrote: > >> Artem Shutak created IGNITE-2554: >> ------------------------------------ >> >> Summary: Affinity.mapKeyToNode() method throw >> "ArithmeticException: / by zero" for LOCAL 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) >> > > |
Hi Ken,
I've investigated the issue and a short answer is it's not a newbie issue. Detailed answer is there is 2 possible ways to fix it (at least): a simple fix and a not simple fix. I need to do the simple fix by yourself because it's need for related issue. The not simple fix is hard for newbie. May be it should be fixed as separate issue. By the way, I will add my investigation results to the ticket and you can try to fix it according to my comments and provide a patch. Thanks, -- Artem -- On Thu, Feb 4, 2016 at 6:14 PM, Ken Cheng <[hidden email]> wrote: > fall into newbie tag? as I am a newbie to ignite. 😁 > > Thanks, > kcheng > > On Thu, Feb 4, 2016 at 11:10 PM, Ken Cheng <[hidden email]> wrote: > > > Hi Artem Shutak , > > > > *Does this issue easy to reproduce? As I would like to work on it.* > > > > > > > > > > Thanks, > > kcheng > > > > On Thu, Feb 4, 2016 at 10:56 PM, Artem Shutak (JIRA) <[hidden email]> > > wrote: > > > >> Artem Shutak created IGNITE-2554: > >> ------------------------------------ > >> > >> Summary: Affinity.mapKeyToNode() method throw > >> "ArithmeticException: / by zero" for LOCAL 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) > >> > > > > > |
Free forum by Nabble | Edit this page |