--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/4c80a814-752d-44df-be5a-ac6dc9f96c58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Richard,
For Hazelcast versions < 3.4 getMap was also blocking in LAZY mode;
It was like this:LAZY --> blocks getMap till the end of all keys load
,EAGER --> blocks getMap till the end of key + value pairs load
But now for the versions >= 3.4:LAZY --> not blocks getMap,
EAGER ---> blocks getMap till the end of all key + value pairs load (this is same with old behavior).
Only difference should be this.
Hope this helps you.
PS: If you share here a reproducer test code with your spring configurations, it may also make things more clear.
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/123b1b7b-2e98-4e51-9a55-3f9e3f3159e7%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/d2975163-4d13-463d-b401-833e1bf4182f%40googlegroups.com.
Hi Richard,
It would be very helpful if you can share your configurations, code-snippets or a reproducer test; this will help in making things clear, because according to my tests getMap with EAGER loading enabled is still a blocking operation. Here is a thread dump from my tests.
"main" #1 prio=5 os_prio=31 tid=0x00007fd0ea006000 nid=0x1303 waiting on condition [0x00000001042fe000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.hazelcast.map.impl.proxy.MapProxySupport.waitUntilLoaded(MapProxySupport.java:607)
at com.hazelcast.map.impl.proxy.MapProxyImpl.waitUntilLoaded(MapProxyImpl.java:71)
at com.hazelcast.map.impl.proxy.MapProxySupport.initializeMapStoreLoad(MapProxySupport.java:160)
at com.hazelcast.map.impl.proxy.MapProxySupport.initialize(MapProxySupport.java:152)
at com.hazelcast.map.impl.proxy.MapProxyImpl.initialize(MapProxyImpl.java:71)
at com.hazelcast.spi.impl.ProxyServiceImpl$ProxyRegistry.createProxy(ProxyServiceImpl.java:339)
at com.hazelcast.spi.impl.ProxyServiceImpl$ProxyRegistry.getOrCreateProxy(ProxyServiceImpl.java:310)
at com.hazelcast.spi.impl.ProxyServiceImpl.getDistributedObject(ProxyServiceImpl.java:131)
at com.hazelcast.instance.HazelcastInstanceImpl.getDistributedObject(HazelcastInstanceImpl.java:403)
at com.hazelcast.instance.HazelcastInstanceImpl.getMap(HazelcastInstanceImpl.java:191)
at com.hazelcast.instance.HazelcastInstanceProxy.getMap(HazelcastInstanceProxy.java:71)
at com.hazelcast.spring.TestFullApplicationContext.testMapConfig(TestFullApplicationContext.java:195)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
Hi Ahmet,--
Thanks for the confirmation that the loadAllKeys() method is now running on its own thread, new functionality added in 3.4 This will stop users such as us from EAGER loading the maps as Spring is initializing.
As for your question 'Are you sure that your maps are using EAGER loading?' yes I am absolutely sure we have correctly configured our maps to EAGER load. The problem we are encountering is down the fact that the MapStore loadAllKeys() method now runs on a different thread than in version prior to 3.4 and this is a problem when EAGER loading during the Spring context initialization of beans.
On Thursday, 8 January 2015 20:08:55 UTC, Ahmet Mircik wrote:Yes loadAllKeys() call is offloaded to a different thread. But in any case, getMap should be a blocking operation for EAGER maps and this offloading should not affect your code.Are you sure that your maps are using EAGER loading? Because i also tested with Spring and it worked fine.On Thu, Jan 8, 2015 at 7:40 PM, Richard <sam0...@googlemail.com> wrote:Hi Ahmet,--
I have a theory about what the issue is with eager loading a Map whilst Spring is initializing. In 3.x this worked fine but stopped working in 3.4 This may be because the loadAllKeys() method of a MapStore is now executed on its own thread where as before only the data loading of values in loadAll() was taking place on a new thread. In our case we use SpringData to load the keys via a Repository but I think the Spring bean dependency tracking is now failing or Spring cant hand out the transaction manager bean as another thread is currently initializing a bean in PostConstruct as mentioned in an earlier thread.
I also note discussions on this topic here https://github.com/hazelcast/hazelcast/issues/3222
Can you confirm if loadAllKeys() now runs on its own thread as I suspect and this si new as of 3.4 ? To be honest if this is the cause its a real pain as making sure all Hazelcast EAGER maps are loaded before the Spring context completes is very useful for us.
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/d2975163-4d13-463d-b401-833e1bf4182f%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/6b83f4c5-30f0-4395-b26a-4292a1d360d4%40googlegroups.com.