incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Per Olesen <...@trifork.com>
Subject Re: Data modelling question
Date Mon, 14 Jun 2010 18:29:07 GMT

On Jun 14, 2010, at 6:29 PM, Benjamin Black wrote:

> On Mon, Jun 14, 2010 at 6:09 AM, Per Olesen <pol@trifork.com> wrote:
>> 
>> So, in my use case, when searching on e.g. company, I can then access the "DashboardCompanyIndex"
with a slice on its SC and then grab all the uuids from the columns, and after this, make
a lookup in the Dashboard CF for each uuid found in the index.
>> 
> 
> That's the normal way to do it.

Okay. Thanks! Nice to know I am on the right path then :-)

I have a little follow-up question: As I asked here http://www.mail-archive.com/user@cassandra.apache.org/msg03498.html
and was kindly answered, that no, batch_mutate is not atomic, how does people then deal with
the case of updating two or more CF (the Dashboard CF and the indices CFs) in the case of
failure in between?

I thought about a model where I update the index CF first. The actual data insert in Dashboard
CF can then fail, so there can be entries in the index CF that points to no rows in the Dashboard
CF. I could then have a periodic job, that cleans up index entries that have no entry in the
Dashboard CF.

Is that the way to work around no atomic updates? 
Or is there another (better) way to organize data for searching?


Mime
View raw message