【发布时间】:2015-08-29 19:33:49
【问题描述】:
我正在浏览 datastax CQL Java Driver 2.1 驱动程序文档以及 CQL 2.X 参考 pdf:
在 CQL 参考 pdf 中:
Batches are atomic by default. In the context of a Cassandra batch operation,
atomic means that if any of the batch succeeds, all of it will.
在CQL java驱动pdf中:
Batch operations
The BATCH statement combines multiple data modification statements (INSERT, UPDATE, DELETE) into
a single logical operation which is sent to the server in a single request. Also batching together multiple
operations ensures these are executed in an atomic way: either all succeed or none.
所以我从一开始就明白,即使批处理中的单个查询成功,批处理也是成功的。
从一开始我就明白,即使批处理中的单个查询失败,批处理也会失败
那么具体是什么?
【问题讨论】:
-
如果我在一个 BATCH 内的不同表上执行两个 INSERT,那真的是一个 BATCH 执行吗?
-
用 Cassandra 的话来说,是的。两个插入将在一批中一起执行。
-
你能提供这两个的链接吗?
标签: cassandra cassandra-2.0 datastax cql3 datastax-java-driver