On Mon, 15 Mar 2010 16:45:49 -0400 Jake Luciani <jak...@gmail.com> wrote:
JL> On Mar 15, 2010, at 4:41 PM, Ted Zlatanov <t...@lifelogs.com> wrote: >> Can there be any assurance that if I specify a Deletion and an >> insertion for a specific SuperColumn in the same batch_mutate() call, >> they will happen atomically? JL> Timestamps. Sorry to be dense but this is not really explained in http://wiki.apache.org/cassandra/API or anywhere else on the wiki so I need to ask for more help. I looked in the archives and threads like "why does remove need a timestamp?" talk about this but only about the remove or get operations in isolation, not together. I understand removal timestamps need to be larger than the old data's timestamps. The API page section on Deletion says it operates on Columns "matching the specified timestamp" but it's not clear what kind of match this is ('>' or '>='). If my mutation is: Deletion("hello", T1) + ... insertion wrapper(SuperColumn("hello", new Column("x", "y", T2))) What should T1 and T2 be, assuming all existing columns in "hello" have a timestamp of a minute ago (guaranteed lower than T1 and T2 because there's only one writer)? Should I make T1 the current time minus one and T2 the current time? My goal is to ensure that "hello" is never empty to readers. I'm trying to avoid even a 1-millisecond gap because I have hundreds of fast readers and there's a good chance they'll hit it. Thanks Ted