cluster-computingreplicationinfinispaninfinispan-8

How can I enable versioning?


I'd like to enable versioning for a replicated cache in a locally-running Infinispan server (8.2.4 final, two Infinispan servers form a cluster).

This is documented in the user guide.

Quote:

10.2.5. Configuration

By default versioning will be disabled.

and the user guide contains the following snippet:

<versioning scheme="SIMPLE|NONE" />

I am using locally-running Infinispan servers, the configuration is in clustered.xml.

A fragment thereof:

    <subsystem xmlns="urn:infinispan:server:core:8.2" default-cache-container="clustered">
        <cache-container name="clustered" default-cache="default" statistics="true">
            [...]
            <replicated-cache name="demoCache" mode="ASYNC" >
                <versioning scheme="SIMPLE"/>
            </replicated-cache>

So when I add the versioning element, starting fails with

Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[186,6]

Message: WFLYCTL0198: Unexpected element '{urn:infinispan:server:core:8.2}versioning' encountered

The XML element versioning indeed exists in urn:infinispan:config:8.2, but not in urn:infinispan:server:core:8.2 (which is used in clustered.xml).

urn:infinispan:config:8.2 is defined in infinispan-server-8.2.4.Final/docs/schema/infinispan-config-8.2.xsd.

urn:infinispan:server:core:8.2 is defined in infinispan-server-8.2.4.Final/docs/schema/jboss-infinispan-core_8_2.xsd

How can I enable (cluster aware) versioning when running Infinispan as a separate server?


Solution

  • Versioning does not make sense when using Infinispan remotely since versioning is purely used to detect write skew situations with repeteable read transactions, and that functionality is not really available to users in server mode.