You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vkulichenko <va...@gmail.com> on 2016/10/14 18:28:28 UTC

Re: Hibernate L2 Issue

Hi,

Please properly subscribe to the mailing list so that the community can
receive email notifications for your messages. To subscribe, send empty
email to user-subscribe@ignite.apache.org and follow simple instructions in
the reply.


msimonsen wrote
> Hello.
> 
> I believe that there is an issue with the Hibernate integration.  I am
> testing with ignite 1.7.0 - although I see no relevant recent updates in
> the ignite-hibernate module.
> There are no issues with respect to single node ignite cluster, I only
> noticed this issue with 
*
> multiple nodes
*
> .  
> 
> I have a REPLICATED, Hibernate L2 cache that is declared as such:
>  
> <bean parent="transactional-cache">
> 	                
> <property name="name" value="com.ethoca.db.gen.Member"/>
> 	            
> </bean>
> <bean id="transactional-cache"
> class="org.apache.ignite.configuration.CacheConfiguration"
> abstract="true">
> 	    
> <property name="cacheMode" value="PARTITIONED"/>
> 	    
> <property name="atomicityMode" value="TRANSACTIONAL"/>
> 	    
> <property name="writeSynchronizationMode" value="FULL_SYNC"/>
> 	
> </bean>
> The beans are annotated, but I have also explicitly set caching the the
> hibernate configuration with the same result.  
> 
> The main issue is that cache is not properly reflected with any given
> member primary key query when executed from another ignite instance/node. 
> Hibernate does not recognize the member has been cached and hits the
> database, registering it in L2 statistics as a miss.
> I can also demonstrate that at runtime, with a write through of the same
> entity that the cache is not getting updated in other nodes - essentially
> it's a local, non-replicated cache.
> 
> I've gone through the example and shown that within a single node (and
> single SessionFactory) instance that things are working fine (read/write
> through, etc), however when I add an additional node things are not fine.
> 
> Please let me know if you need me to clarify anything!

This is a known issue, see the note about binary format here:
https://apacheignite.readme.io/docs/hibernate-l2-cache#l2-cache-configuration

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Hibernate-L2-Issue-tp8298p8299.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Hibernate L2 Issue

Posted by msimonsen <ms...@gmail.com>.
                                                                                      I think you are right I had zeppelin running and connecting as client.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         From: vkulichenko [via Apache Ignite Users] Sent: Friday, October 14, 2016 7:14 PM To: msimonsen Subject: Re: Hibernate L2 Issue 

	Hm, actually I think that after switching to multicast your nodes stopped to discover each other. Do you see correct topology snapshots in the logs?
The exception means that one of the nodes still uses BinaryMarshaller (which is the default one), but all nodes must have the same marshaller to communicate. Make sure that you switch to OptimizedMarshaller everywhere.
-Val

	
	
	
	
	
	
	
		If you reply to this email, your message will be added to the discussion below: 
		http://apache-ignite-users.70518.x6.nabble.com/Hibernate-L2-Issue-tp8298p8310.html 
	
	
		
		To unsubscribe from Hibernate L2 Issue, click here . 
		NAML 
	




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Hibernate-L2-Issue-tp8298p8312.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Hibernate L2 Issue

Posted by vkulichenko <va...@gmail.com>.
Hm, actually I think that after switching to multicast your nodes stopped to
discover each other. Do you see correct topology snapshots in the logs?

The exception means that one of the nodes still uses BinaryMarshaller (which
is the default one), but all nodes must have the same marshaller to
communicate. Make sure that you switch to OptimizedMarshaller everywhere.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Hibernate-L2-Issue-tp8298p8310.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Hibernate L2 Issue

Posted by msimonsen <ms...@gmail.com>.
Awesome, that did the trick!

I had to remove the TcpDiscoveryVmIpFinder because it was complaining:
org.apache.ignite.spi.IgniteSpiException: Local node's marshaller differs
from remote node's marshaller (to make sure all nodes in topology have
identical marshaller, configure marshaller explicitly in configuration)
[locMarshaller=org.apache.ignite.marshaller.optimized.OptimizedMarshaller,
rmtMarshaller=org.apache.ignite.internal.binary.BinaryMarshaller,
locNodeAddrs=[172.17.0.1/0:0:0:0:0:0:0:1%lo, 192.168.33.37/127.0.0.1, /
172.17.0.1, /192.168.33.37], locPort=48500, rmtNodeAddr=[
172.17.0.1/0:0:0:0:0:0:0:1%lo, 192.168.33.37/127.0.0.1, /172.17.0.1, /
192.168.33.37], locNodeId=9efb532c-1c12-4f7f-b35f-e7549ea22d78,
rmtNodeId=7d3e4564-00fe-4f96-ad34-6624a034f571]
    at
org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.checkFailedError(TcpDiscoverySpi.java:1645)

But I replaced it the multicast ip finder and it worked.



On Fri, Oct 14, 2016 at 2:28 PM, vkulichenko [via Apache Ignite Users] <
ml-node+s70518n8299h54@n6.nabble.com> wrote:

> Hi,
>
> Please properly subscribe to the mailing list so that the community can
> receive email notifications for your messages. To subscribe, send empty
> email to user-subscribe@ignite.apache.org and follow simple instructions
> in the reply.
>
> msimonsen wrote
> Hello.
>
> I believe that there is an issue with the Hibernate integration.  I am
> testing with ignite 1.7.0 - although I see no relevant recent updates in
> the ignite-hibernate module.
> There are no issues with respect to single node ignite cluster, I only
> noticed this issue with *multiple nodes*.
>
> I have a REPLICATED, Hibernate L2 cache that is declared as such:
>  <bean parent="transactional-cache">
>                         <property name="name" value="com.ethoca.db.gen.
> Member"/>
>                     </bean>
> <bean id="transactional-cache" class="org.apache.ignite.configuration.CacheConfiguration"
> abstract="true">
>             <property name="cacheMode" value="PARTITIONED"/>
>             <property name="atomicityMode" value="TRANSACTIONAL"/>
>             <property name="writeSynchronizationMode" value="FULL_SYNC"/>
>         </bean>
>
> The beans are annotated, but I have also explicitly set caching the the
> hibernate configuration with the same result.
>
> The main issue is that cache is not properly reflected with any given
> member primary key query when executed from another ignite instance/node.
> Hibernate does not recognize the member has been cached and hits the
> database, registering it in L2 statistics as a miss.
> I can also demonstrate that at runtime, with a write through of the same
> entity that the cache is not getting updated in other nodes - essentially
> it's a local, non-replicated cache.
>
> I've gone through the example and shown that within a single node (and
> single SessionFactory) instance that things are working fine (read/write
> through, etc), however when I add an additional node things are not fine.
>
> Please let me know if you need me to clarify anything!
>
> This is a known issue, see the note about binary format here:
> https://apacheignite.readme.io/docs/hibernate-l2-cache#l2-
> cache-configuration
>
> -Val
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-ignite-users.70518.x6.nabble.com/Hibernate-
> L2-Issue-tp8298p8299.html
> To unsubscribe from Hibernate L2 Issue, click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=8298&code=bXNpbW9uc2VuQGdtYWlsLmNvbXw4Mjk4fDIwMDU3NDM0ODA=>
> .
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Hibernate-L2-Issue-tp8298p8304.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.