I run an example with two ignite cache node in two jvm. each jvm runs a ignite node. the nodes map to the same cache.
ignite-config.xml
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
...
<property name="cacheConfiguration">
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set a cache name. -->
<property name="name" value="cacheName"/>
<!-- Set cache mode. -->
<property name="cacheMode" value="PARTITIONED"/>
<!-- Number of backup nodes. -->
<property name="backups" value="1"/>
...
</bean>
</property>
</bean>
test steps:
- one of the ignite nodes start first and write 10 pieces of data(key-value: 1-1,2-2,3-3...10-10).
- then the second one start and map to the cache.
- then ignite nodes start to rebalancing data for them. the first node has 4 pieces, the second has 6 pieces.
- then i kill the jvm of first cache node.
result: the backup node doesn't own 10 pieces as i expect.why?
cache -scan
shows only primary entries I think. WhatIgniteCache.size()
returns after the node is killed? – Valentin Kulichenko