ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Artem Shutak (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (IGNITE-2554) Affinity.mapKeyToNode() method throw "ArithmeticException: / by zero" for LOCAL dinamically started cache
Date Mon, 29 Feb 2016 12:13:18 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-2554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Artem Shutak resolved IGNITE-2554.
----------------------------------
    Resolution: Fixed

The simple fix was done, reviewed and merged in bounds of IGNITE-2521 (#953b575).

Did issue (IGNITE-2733) to fix it properly.

> 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
>            Assignee: 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.
> If cache started on node start then there is no exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message