cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Chlupacek (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-8018) Cassandra seems to insert twice in custom PerColumnSecondaryIndex
Date Mon, 29 Sep 2014 16:08:33 GMT
Pavel Chlupacek created CASSANDRA-8018:

             Summary: Cassandra seems to insert twice in custom PerColumnSecondaryIndex
                 Key: CASSANDRA-8018
             Project: Cassandra
          Issue Type: Bug
          Components: Core
            Reporter: Pavel Chlupacek
             Fix For: 2.1.0

When inserting data into Cassandra 2.1.0 into table with custom secondary index, the Cell
is inserted twice, if inserting new entry into row with same rowId, but different cluster
index columns. 


CREATE KEYSPACE fulltext WITH replication = {'class': 'SimpleStrategy',  'replication_factor'
: 1};

CREATE TABLE fulltext.test ( id uuid, name text, name2 text, json varchar, lucene text, primary
key ( id , name));

s"CREATE CUSTOM INDEX lucene_idx on fulltext.test(lucene) using 'com.spinoco.fulltext.cassandra.TestIndex';

// this causes only one insert
      .value("id", id1.uuid)
      .value("name", "goosh1") 
      .value("json", TestContent.message1.asJson)

// this causes 2 inserts to be done 
        .value("id", id1.uuid)
        .value("name", "goosh2")
        .value("json", TestContent.message2.asJson)

/// stacktraces for inserts (always same, for 1st and 2nd insert)

<custom indexer stacktraces> and then
	at org.apache.cassandra.db.index.SecondaryIndexManager$StandardUpdater.insert(
	at org.apache.cassandra.db.AtomicBTreeColumns$ColumnUpdater.apply(
	at org.apache.cassandra.db.AtomicBTreeColumns$ColumnUpdater.apply(
	at org.apache.cassandra.utils.btree.NodeBuilder.addNewKey(
	at org.apache.cassandra.utils.btree.NodeBuilder.update(
	at org.apache.cassandra.utils.btree.Builder.update(
	at org.apache.cassandra.utils.btree.BTree.update(
	at org.apache.cassandra.db.AtomicBTreeColumns.addAllWithSizeDelta(
	at org.apache.cassandra.db.Memtable.put(
	at org.apache.cassandra.db.ColumnFamilyStore.apply(
	at org.apache.cassandra.db.Keyspace.apply(
	at org.apache.cassandra.db.Keyspace.apply(
	at org.apache.cassandra.db.Mutation.apply(
	at org.apache.cassandra.service.StorageProxy$7.runMayThrow(
	at org.apache.cassandra.service.StorageProxy$
	at java.util.concurrent.Executors$
	at org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$

//// Note that cell, rowkey and Group in public abstract void insert(ByteBuffer rowKey, Cell
col, OpOrder.Group opGroup); are having for both successive calls same identity 

This message was sent by Atlassian JIRA

View raw message