You may be able to do something with conditional updates, however trying to
use Cassandra for this kind of coordination smells to me a lot like typical
antipatterns (eg write then read or read then write).  You probably would
do better if you need one writer to consistently win a race condition over
another if you manipulated timestamps, such as having the lower priority
node write with a timestamp of now minus a few seconds.

Otherwise if you need this kind of cross-node coordination and
responsibility assignment, a purpose built tool like Zookeeper would
probably be a better idea and give more predictable and consistent results.

On Sun Nov 16 2014 at 12:03:18 AM Kevin Burton <[email protected]> wrote:

> I have two tasks trying to each insert into a table.  The only problem is
> that I only want one to win, and then never perform that operation again.
>
> So my idea was to use the set append support in Cassandra to attempt to
> append to the set and if we win, then I can perform my operation.  The
> problem is, how.. I don’t think there’s a way to find out that your INSERT
> successfully added or failed a set append.
>
> Is there something I’m missing?
>
> Kevin
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>
>
>

Reply via email to