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