[infinispan-issues] [JBoss JIRA] (ISPN-3520) Cassandra Cache Store is read-only by default

Giovanni Mels (JIRA) jira-events at lists.jboss.org
Wed Sep 18 08:27:03 EDT 2013


Giovanni Mels created ISPN-3520:
-----------------------------------

             Summary: Cassandra Cache Store is read-only by default
                 Key: ISPN-3520
                 URL: https://issues.jboss.org/browse/ISPN-3520
             Project: Infinispan
          Issue Type: Bug
          Components: Loaders and Stores
    Affects Versions: 6.0.0.Alpha4, 5.2.6.Final
            Reporter: Giovanni Mels
            Assignee: Mircea Markus


It is impossible to store any data in the Cassandra cache store, because it is created as read-only, even when specifying {{ignoreModifications = false}}. See the attached test case:


[INFO ] ISPN000078: Starting JGroups Channel (org.infinispan.remoting.transport.jgroups.JGroupsTransport)
[INFO ] ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration! (org.infinispan.remoting.transport.jgroups.JGroupsTransport)
[INFO ] ISPN000094: Received new cluster view: [GNELA182-53637|0] [GNELA182-53637] (org.infinispan.remoting.transport.jgroups.JGroupsTransport)
[INFO ] ISPN000079: Cache local address is GNELA182-53637, physical addresses are [fe80:0:0:0:64f5:4fad:cd2e:b5cf:51350] (org.infinispan.remoting.transport.jgroups.JGroupsTransport)
[INFO ] ISPN000128: Infinispan version: Infinispan 'Delirium' 5.2.6.Final (org.infinispan.factories.GlobalComponentRegistry)
[DEBUG] automatically create keyspace (org.infinispan.loaders.cassandra.CassandraCacheStore)
[INFO ] ConnectionPool initialized. (net.dataforte.cassandra.pool.ConnectionPool)
[DEBUG] cleaning up expired entries... (org.infinispan.loaders.cassandra.CassandraCacheStore)
[TRACE] purgeInternal (org.infinispan.loaders.cassandra.CassandraCacheStore)
[INFO ] ConnectionPool initialized. (net.dataforte.cassandra.pool.ConnectionPool)
[DEBUG] started (org.infinispan.loaders.cassandra.CassandraCacheStore)
*[TRACE] Ignoring clear invocation (org.infinispan.loaders.decorators.ReadOnlyStore)*
[INFO ] ISPN000031: MBeans were successfully registered to the platform MBean server. (org.infinispan.jmx.CacheJmxRegistration)
[INFO ] creating  test1 (com.agfa.aca.PassivationTest)
[DEBUG] Key 'entry_test1' not found (org.infinispan.loaders.cassandra.CassandraCacheStore)
*[TRACE] Ignoring removal of key (org.infinispan.loaders.decorators.ReadOnlyStore)*
[INFO ] created test1 (com.agfa.aca.PassivationTest)
[INFO ] creating  test2 (com.agfa.aca.PassivationTest)
[DEBUG] Key 'entry_test2' not found (org.infinispan.loaders.cassandra.CassandraCacheStore)
[INFO ] passivating test1 (com.agfa.aca.PassivationTest)
*[TRACE] Ignoring store invocation (org.infinispan.loaders.decorators.ReadOnlyStore)*
[INFO ] passivated test1 (com.agfa.aca.PassivationTest)
*[TRACE] Ignoring removal of key (org.infinispan.loaders.decorators.ReadOnlyStore)*
[INFO ] created test2 (com.agfa.aca.PassivationTest)
[DEBUG] Key 'entry_test1' not found (org.infinispan.loaders.cassandra.CassandraCacheStore)

I tracked this bug down to the {{create}} method in {{CassandraCacheStoreConfigurationBuilder}}
{code}
   @Override
   public CassandraCacheStoreConfiguration create() {
      List<CassandraServerConfiguration> remoteServers = new ArrayList<CassandraServerConfiguration>();
      for (CassandraServerConfigurationBuilder server : servers) {
         remoteServers.add(server.create());
      }
      return new CassandraCacheStoreConfiguration(autoCreateKeyspace, configurationPropertiesFile, entryColumnFamily,
            expirationColumnFamily, framed, remoteServers, keyMapper, keySpace, password, sharedKeyspace, username,
            readConsistencyLevel, writeConsistencyLevel, autoCreateKeyspace, sharedKeyspace, purgerThreads, framed,
            autoCreateKeyspace, TypedProperties.toTypedProperties(properties), async.create(), singletonStore.create());
   }
{code}
Note how {{autoCreateKeyspace}} is used in stead of {{purgeInternal}} and {{ignoreModifications}}, so if you explicitly set {{autoCreateKeyspace = false}} you can work around the issue.
This is tested on 5.2.6, all versions from 5.2 on have the same error.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list