Maciej Miklas
Maciej Miklas

Reputation: 3331

Cassandra TimedOutException and data modification for batch updates

I execute batch update which modifies few rows within few column families. In case of TimedOutException some data could be modified, but possibly not whole set....

In order to implement compensating transaction, I would need to know what data (rows) was modified - is there a way to find this out? Does exception contain this information?

Thanks, Maciej

Upvotes: 2

Views: 753

Answers (1)

zznate
zznate

Reputation: 1908

Creating a system that can scale out means taking some trade-offs - one of these is facilitating "idempotent" operations in your application.

This means that you would either:

  • assume that the data was written somewhere and that the node will eventually become consistent

  • fire the entire contents of the write again, perhaps sleeping a given amount of time or
    at a less restrictive consistency level

A good description of this approach can be found in section 6 of Pat Helland's "Building on Quicksand" paper: http://arxiv.org/pdf/0909.1788

Upvotes: 3

Related Questions