ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Himetic <cameron.wisem...@theplatform.com>
Subject Configuring ignite distributed hibernate cache
Date Tue, 27 Sep 2016 21:37:52 GMT
I'm using the hibernate caching ignite provides (as documented here:
https://apacheignite.readme.io/docs/hibernate-l2-cache) and having some
difficulty getting the caching to work in a distributed manner.  It works
fine when the object is cached locally, and it seems to be aware of the
other machine (in the logs it prints:

Metrics for local node (to disable set 'metricsLogFrequency' to 0)
    ^-- Node [id=5ae49faa, name=hibernate-grid, uptime=00:01:00:000]
    ^-- *H/N/C [hosts=2, nodes=2, CPUs=16]*
    ^-- CPU [cur=0.53%, avg=9.92%, GC=0%]
    ^-- Heap [used=986MB, free=45.84%, comm=1597MB]
    ^-- Non heap [used=146MB, free=-1%, comm=150MB]
    ^-- Public thread pool [active=0, idle=16, qSize=0]
    ^-- System thread pool [active=0, idle=16, qSize=0]
    ^-- Outbound messages queue [size=0]

when we start up the second machine, which seems to indicate that it's
reaching the second machine, at least in some capacity.  But when we perform
a GET on one machine, and then on the other, the second machine isn't
hitting the cached value.

I believe we've got it set up for partitioned caching across the hosts. 
Here's the xml for the hosts:

        <property name="discoverySpi">
                <property name="localPort" value="48500"/>
                <property name="localPortRange" value="20"/>
                <property name="ipFinder">
                        <property name="addresses">
                                <value>[IP addr 1]:48500..48520</value>
                                <value>[IP addr 2]:48500..48520</value>

Each of the caches is set up to extend the transactional parent from the

    <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"/>

As I said, the cache itself IS working locally, but it doesn't seem to
actually be partitioning it.  I debugged into the cache retrieval method and
it's going through GridCacheAdapter in Ignite, but ultimately not finding
the value that's supposed to cached already from making the call on the
other machine.  Is there something wrong with our configuration?  Or is
there some other step I missed?  Thanks!

View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Configuring-ignite-distributed-hibernate-cache-tp7975.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message