-
Bug
-
Resolution: Done
-
Major
-
12.0.1.Final
-
None
While doing a test with
Properties properties = new Properties(); properties.put(DEFAULT_EXECUTOR_FACTORY_POOL_SIZE, 25); ConfigurationBuilder cb = new ConfigurationBuilder().uri("hotrod://admin:admin@localhost:11222"); cb.asyncExecutorFactory().factory(p -> new NioEventLoopGroup(2)); cb.withProperties(properties); String cacheName = "fooCache"; RemoteCacheManager remoteCacheManager = new RemoteCacheManager(cb.build()); remoteCacheManager.administration().removeCache(cacheName); remoteCacheManager.administration().createCache(cacheName, "org.infinispan.DIST_SYNC"); remoteCacheManager.getCache("fooCache").put("foo", "bar");
The code in ChannelFactory is returning the default value
private int maxAsyncThreads(ExecutorService executorService, Configuration configuration) { if (executorService instanceof ThreadPoolExecutor) { return ((ThreadPoolExecutor) executorService).getMaximumPoolSize(); } // Note: this is quite dangerous, if someone sets different executor factory and does not update this setting // we might deadlock return new ConfigurationProperties(configuration.asyncExecutorFactory().properties()).getDefaultExecutorFactoryPoolSize(); }
This is because in TypedProperties it is waiting for the value as String
public int getIntProperty(String key, int defaultValue, boolean doStringReplace) { String value = this.getProperty(key); if (value == null) {