1 Reply Latest reply on Jul 29, 2011 9:43 AM by Mircea Markus

    How to enable flush in 4.2.1 CR4 version?

    James Cameron Newbie

      Hi,

       

      My clustered cache throws this exception:

       

      org.infinispan.config.ConfigurationException: Flush should be enabled. This is related to https://jira.jboss.org/jira/browse/ISPN-83.

       

      The http://community.jboss.org/thread/162748 discusses the issue and suggests using 4.2.1.CR2. I'm using 4.2.1.CR4 but still get the exception.

       

      Can anyone know how to enable flush in configuration file? Thank you!

       

      My configuration is as follows.

       

      <?xml version="1.0" encoding="UTF-8"?>

      <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:infinispan:config:4.2 http://www.infinispan.org/schemas/infinispan-config-4.2.xsd" xmlns="urn:infinispan:config:4.2">

       

          <global>

              <transport

                  clusterName="lei liu-cluster"

                  transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport">

                  <properties>

                        <property name="configurationFile" value="udp.xml"/>

                  </properties>

              </transport>

          </global>

         

          <default>

              <clustering mode="replication">

                    <stateRetrieval fetchInMemoryState="true"/>

                  <async/>

              </clustering>

            </default>

       

          <namedCache name="myCache">

              <transaction                    

          transactionManagerLookupClass="org.infinispan.transaction.lookup.DummyTransactionManagerLookup"

                       syncRollbackPhase="false"

                       syncCommitPhase="false"

                       useEagerLocking="false"/>

              <eviction wakeUpInterval="500" maxEntries="1000" strategy="LRU"/>

              <invocationBatching enabled="true"/>

              <jmxStatistics enabled="true"/>

          </namedCache>

         

      </infinispan>

        • 1. Re: How to enable flush in 4.2.1 CR4 version?
          Mircea Markus Master

          FLUSH is a jgroups protocol, and should be enabled in the jgroups' configuration file; in your case, that is udp.xml.

          What you should do is add  "<pbcast.FLUSH timeout="0"/>" as the last protcol. It should look something like:

          <config xmlns="urn:org:jgroups"

                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                  xsi:schemaLocation="urn:org:jgroups file:schema/JGroups-2.8.xsd">

             <UDP         mcast_addr="${jgroups.udp.mcast_addr:228.6.7.8}" />

              ....

             <pbcast.FLUSH timeout="0"/>

          </config>

          The best appraoch would be to switch to 5.0 though, where FLUSH is no longer requreid.