JBoss Community Archive (Read Only)

Infinispan 6.0

What consistency guarantees do I have with different Asynchronous processing settings ?

There are 3 main configuration settings (modes of usage) that affect the behaviour of Infinispan in terms of Asynchronous processing, summarized in the following table:

Config / Mode of usage

Description

API

Usage ofAsynchronous API, i.e. methods of the Cache interface like e.g. putAsync(key, val)

Marshalling

Allowing Asynchronous Marshalling, in cache configuration (via XML or programmatic configuration)

Replication

Configuring a clustered cache to replicate data asychronously. In Infinispan XML configuration this is done by using <sync> or <async> sub-elements under<clustering> element.

Switching to asynchronous mode in each of these areas causes loss of some consistency guarrantees. The known problems are summarised here:

API

Replication

Marshalling

Consistency problems

Sync

Sync

Sync

 

Sync

Async

Sync

1 - Cache entry is replicated with a delay or not at all in case of network error.
2 - Node where the operation originated won't be notified about errors that happened on network or on the receiving side.

Sync

Async

Async

1, 2
3 - Calling order of sync API method might not be preserved – depends on which operation finishes marshalling first in the asyncExecutor
4 - Replication of put operation can be applied on different nodes in different order – this may result in inconsistent values

Async

Sync

Sync

3

Async

Async

Sync

1, 2, 3

Async

Async

Async

1, 2, 3, 4

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 09:41:25 UTC, last content change 2013-03-22 12:50:59 UTC.