Skip to content

Difference between batch and transaction? #138

Closed Answered by marvin-j97
xubaiwang asked this question in Q&A
Discussion options

You must be logged in to vote

A batch is simply an atomic set of changes (inserts or removals), but there are no transactional semantics. If you concurrently run update operations (e.g. incrementing a counter), you could run into lost updates, and in general there is no notion of repeatable reads.

Transactions are batches, but provide serializable transactional semantics. Generally, I'd go for TransactionalKeyspace, unless you know that your workload does not need transactions (e.g. metrics, event logging, etc).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by xubaiwang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested api
2 participants