Hi, I've been developing a system against cassandra over the last few weeks, and I'd like to ask the community some advice on the best way to deal with inserting new data where the key is currently a tombstone record.
As with all distributed systems, this is always a tricky thing to deal with, so I though I'd throw it to a wider audience. 1) insert new record. 2) deleted record. 3) insert record with same key as deleted record. Now I know I can make this work if I flush and compact between 2 and 3. However, I don't want to rely on a flush and compact and I'd like to code defensively against this senario, and I've ended up looking up to see if the key exists, then if it does then I know I can't insert the data. However, if the key does not exist then I attempt an insert. Now, here lies the issue. If I have more than one client doing this at the same time, both trying to insert using the same key. One will succeed and ones will fail. However neither insert will give me an indication of which one actually succeeded. So should an insert against an existing key, or deleted key produce some kind of exception ? Cheers, --Jools