cassandrapelops

Reinserting data after row deletion in cassandra using Pelops


I am trying to re-insert data for same row-key after deleting the row but they are not getting inserted. Neither any exception is thrown.

I am using Pelops RowDeletor to delete the row data (Note that the row-key is still shown with no columns) after deleting. If I truncate the table and reinsert columns gets inserted.

I have tried changing consistency levels from ANY to ONE to ALL. Any ideas as to whats the problem or should I go for Hector client?


Solution

  • This can be an issue with the tombstones (keys without columns) if your timestamp on your column is in the past. Make sure this is not the case, and you should be able to insert. Note that this is not an issue with Pelops but is related to Cassandra's conflict resolution. If you have a tombstone that's newer than the insert, you will have this issue because Cassandra sees the delete as having happened after the insert.