即使我的查询没有选项,如果存在和如果不存在,你能给我一些建议吗。仍然在查询跟踪结果中显示了一致性和级别“quorum”,这正是我们想要的
但它也显示“序列一致性水平”:“序列”,这是什么行为
session_id | client | command | coordinator | duration | parameters | request | started_at
--------------------------------------+-------------+---------+-------------+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------+---------------------------------
278a2000-3dfb-11e9-b459-9775e6c46fc6 | 10.244.*.* | QUERY | 10.244.*.* | 3338 |
`
`{'bound_var_0_stream_id': '''3c17230d-ea24-4ff7-9599-352fef883b31''',
'bound_var_1_property_name': '''Location:rxRSSI''',
'bound_var_2_shard_date': '2019-03-03T00:00:00.000Z',
'bound_var_3_time': '2019-03-03T21:27:30.749Z',
'bound_var_4_source_id': '''fe30653c-467f-401a-9646-67b10378e1c9''',
'bound_var_5_time_lag': '1328',
'bound_var_6_property_class': '''java.lang.Integer''',
'bound_var_7_property_type': '''ByteType''',
'bound_var_8_property_value': '''-44''',
'consistency_level': 'LOCAL_QUORUM',
'page_size': '5000',
'query': 'INSERT INTO "cloudleaf"."stream_48" ("stream_id", "property_name", "shard_date", "time", "source_id", "time_lag", "property_class", "property_type", "property_value")
VALUES (:"stream_id", :"property_name", :"shard_date", :"time", :"source_id", :"time_lag", :"property_class", :"property_type", :"property_value")
USING TTL 432000',
'serial_consistency_level': 'SERIAL'}
1条答案
按热度按时间kx7yvsdv1#
IF EXISTS
以及IF NOT EXISTS
触发轻量级事务,它可以具有两个一致性级别之一SERIAL
或者LOCAL_SERIAL
. 其定义如下:SERIAL
:通过防止无条件更新,实现轻量级事务的线性化一致性。此一致性级别仅用于轻量级事务。相当于法定人数。LOCAL_SERIAL
:与串行相同,但仅限于数据中心。条件写入必须写入同一数据中心中副本节点的仲裁上的提交日志和memtable。与serial相同,但用于在本地(在单个数据中心内)保持一致性。相当于当地的法定人数。请参见:https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlconfigserialconsistency.html