Hi Kristian,

This property means that a node that is being started and where a part of cache 
data is being rebalanced won’t be considered for any cache related operations 
until the rebalancing has finished.

In my understanding such a node won’t be considered for cache operations like 
put, get, etc. until all the data is fully rebalanced on it. However this 
doesn’t prevent from getting a cache reference on this node and ask for current 
cache size.

—
Denis

> On Jun 9, 2016, at 3:28 PM, Kristian Rosenvold <krosenv...@apache.org> wrote:
> 
> The javadoc on CacheRebalanceMode.SYNC seems to indicate that the
> cache should block until rebalancing is complete.
> When I run the code below, the assert statement fails unless I add the
> explicit call to cache.rebalance().get().
> 
> Am I doing something wrong ?
> 
> Kristian
> 
> 
> CacheConfiguration config = new CacheConfiguration();
> ....
> config.setCacheMode(CacheMode.REPLICATED);
> config.setRebalanceMode(CacheRebalanceMode.SYNC);
> final IgniteCache cache = ignite.getOrCreateCache(config);
> // cache.rebalance().get();
> assertThat(cache.localSize(CachePeekMode.ALL)).isEqualTo(knownRemoteSize);

Reply via email to