Infinispan 7 - Обновление существующих ключей не реплицируется на другие узлы
Мы используем Infinispan 7.2.1 в качестве реплицируемого постоянного кэша между 2 узлами. Мы также используем Tomcat и Spring. Никакой спячки не требует.
Первый узел - чтение и запись в кеш.
Второй узел только читает из кеша.
Проблема, с которой мы сталкиваемся:
Значения узла #2, считываемые из кэша, являются значениями первой вставки, выполненной узлом #1. Обновления существующих ключей не отражаются, когда узел 2 получает запись из кэша.
Пример:
Node 1: cache.put('x', 1)
Node 1: cache.put('x', 2)
Node 1: cache.put('x', 3)
Node 2: cache.get('x') ==> return 1 (!)
Фрагмент из нашего файла конфигурации Infinispan xml:
<cache-container default-cache="OM_FILE_LAST_INSPECTION_REPLICA_CACHE" name="org.infinispan.offline.replica">
<transport stack="tcpStack" cluster="om_cluster" />
------
<replicated-cache name="OM_TASK_PROGRESS_REPLICA_CACHE" mode="SYNC">
<locking striping="false" />
<transaction mode="NON_XA" locking="PESSIMISTIC" />
<eviction strategy="NONE" />
<persistence passivation="false">
<file-store max-entries="10000" path="path to some folder on disk" />
</persistence>
</replicated-cache>
------
При отладке я также заметил следующее, как в журнале:
2015-10-15 09:27:15,584 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for JBoss AS 7
2015-10-15 09:27:15,585 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [java:jboss/TransactionManager (JBoss AS 7)]
2015-10-15 09:27:15,585 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for JBoss AS 4 ~ 6, JRun4
2015-10-15 09:27:15,585 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [java:/TransactionManager (JBoss AS 4 ~ 6, JRun4)]
2015-10-15 09:27:15,585 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for Resin 3.x
2015-10-15 09:27:15,585 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [java:comp/TransactionManager (Resin 3.x)]
2015-10-15 09:27:15,585 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for Sun Glassfish
2015-10-15 09:27:15,586 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [java:appserver/TransactionManager (Sun Glassfish)]
2015-10-15 09:27:15,586 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for Borland, Sun
2015-10-15 09:27:15,586 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [java:pm/TransactionManager (Borland, Sun)]
2015-10-15 09:27:15,586 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for BEA WebLogic
2015-10-15 09:27:15,586 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [javax.transaction.TransactionManager (BEA WebLogic)]
2015-10-15 09:27:15,586 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for Resin, Orion, JOnAS (JOTM)
2015-10-15 09:27:15,588 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [java:comp/UserTransaction (Resin, Orion, JOnAS (JOTM))]
2015-10-15 09:27:15,588 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for Karaf
2015-10-15 09:27:15,591 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [osgi:service/javax.transaction.TransactionManager (Karaf)]
2015-10-15 09:27:15,591 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying WebSphere 5.1: com.ibm.ws.Transaction.TransactionManagerFactory
2015-10-15 09:27:15,594 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying WebSphere 5.0: com.ibm.ejs.jts.jta.TransactionManagerFactory
2015-10-15 09:27:15,598 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying WebSphere 4: com.ibm.ejs.jts.jta.JTSXA
2015-10-15 09:27:15,601 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Couldn't find any WebSphere TransactionManager factory class, neither for WebSphere version 5.1 nor 5.0 nor 4
2015-10-15 09:27:15,612 WARN [localhost-startStop-1] [GenericTransactionManagerLookup] ISPN000104: Falling back to DummyTransactionManager from Infinispan