【发布时间】:2017-04-21 03:36:18
【问题描述】:
我正在尝试使用 Cassandra cpp-driver 对批处理中的不同表执行 3 个条件插入:
BEGIN BATCH
insert into table1 values (...) IF NOT EXISTS
insert into table2 values (...) IF NOT EXISTS
insert into table3 values (...) IF NOT EXISTS
APPLY BATCH
但我收到以下错误:
Batch with conditions cannot span multiple tables
如果在 Cassandra 中无法实现上述操作,那么将多个条件插入作为事务执行并确保全部成功或全部失败的替代方法是什么?
【问题讨论】:
标签: cassandra batch-processing datastax cassandra-3.0 nosql