Nikita Sokolov
Nikita Sokolov

Reputation: 55

Infinispan 9.1: Unsupported async cache mode 'REPL_ASYNC' for transactional caches

I'm migrating the project to Infinispan 9.1.0.Final from 8.2.4.Final and got next exception:

org.infinispan.commons.CacheConfigurationException: ISPN000441: Unsupported async cache mode 'REPL_ASYNC' for transactional caches

Related code:

new ConfigurationBuilder()
            .jmxStatistics()
            .enabled(false)
            .available(false)
            .clustering()
            .cacheMode(CacheMode.REPL_ASYNC)
            .stateTransfer().awaitInitialTransfer(false)
            .transaction()
            .transactionManagerLookup(new DummyTransactionManagerLookup())
            .transactionMode(TransactionMode.TRANSACTIONAL)
            .lockingMode(LockingMode.PESSIMISTIC)
            .recovery()
            .enabled(false)
            .invocationBatching()
            .enable(false)
            .indexing()
            .index(Index.ALL)
            .addProperty("default.indexmanager", "near-real-time")
            .addProperty("default.directory_provider", "ram")
            .addProperty("default.worker.execution", "sync")
            .addProperty("default.exclusive_index_use", "true")
            .addProperty("default.reader.strategy", "shared")
            .build();

And problem combination here, but in 8.2.4.Final version this works well.

.cacheMode(CacheMode.REPL_ASYNC)
.transactionMode(TransactionMode.TRANSACTIONAL) // Maybe is there another way to lock put operations?

How should I reconfig cache to save its characteristics?

Upvotes: 2

Views: 635

Answers (1)

pruivo
pruivo

Reputation: 1334

The async mode for transactional caches wasn't safe since it didn't wait for the transaction to commit in every node in the cluster before reporting to the TransactionManager. It can make your data inconsistent if you are unlucky.

To avoid any issues, it was removed. Please upgrade your configuration to use REPL_SYNC instead.

Also, the DummyTransactionManagerLookup was deprecated and it should be replaced by EmbeddedTransactionManagerLookup.

There are other transaction related change between 8.x and 9.x. Please take a look at the upgrade guide (http://infinispan.org/docs/stable/upgrading/upgrading.html#upgrading_from_8_x_to_9_0) for more details.

Upvotes: 2

Related Questions