我有以下情况。Cassandra更新以几个节点静默失败
有一个CQL表(卡桑德拉2.0.12)
CREATE TABLE article (
version timeuuid,
id timeuuid,
active boolean,
contentbody text,
contentformat text,
createdat text,
entitytype text,
externalsources list<text>,
geolat double,
geolong double,
lastcomments list<text>,
lastmodifiedat text,
lstmodbyuserid text,
lstmodbyusername text,
previewimage text,
publishedatarticle text static,
publishedatver text,
status text,
subcategory text,
subtitle text,
title text,
userid text static,
username text static,
PRIMARY KEY ((version), id)
) WITH
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.100000 AND
gc_grace_seconds=864000 AND
index_interval=128 AND
read_repair_chance=0.000000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
default_time_to_live=0 AND
speculative_retry='99.0PERCENTILE' AND
memtable_flush_period_in_ms=0 AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'LZ4Compressor'};
,并用它与datastax-java的驱动器(卡桑德拉驱动器芯2.1.1)
当群集包含3工作节点的数据更新,像
UPDATE article SET title='updated title2',subtitle=null,status='draft',subCategory='{"id":"a6b68330-2ef5-4267-98c5-cd793edbb1a8","name":"sub cat name","color":"blue","parentCategory":{"id":"prim_cat_id","name":"prim cat name","color":"blue"}}',contentBody='someOtherBody',contentFormat='someOtherFormat',geoLat=138782.34,geoLong=138782.34,lastModifiedAt='2015-03-02 11:14:57',publishedAtArticle=null,publishedAtVer=null,lstModByUserId='e264fb2c-2485-488a-965f-765d139be9ea',lstModByUsername='reg1 user',externalSources=[],previewImage='{"width":1,"height":2,"duration":32,"original":"orig string","thumbs":{"prefix":"prefix str","ext":"jpg","sizes":["size1","size2"]}}' WHERE version=2480d891-c0cd-11e4-a691-df79ef55172c AND id=2480d890-c0cd-11e4-a691-df79ef55172c;
并不在大约一半默默的情况下工作(没有错误我在卡桑德拉日志中看到,在没有任何可疑的痕迹,没有失败的回答或异常,我可以看到它没”只需通过SELECT成功)。如果来自一个节点的集群,它始终有效。
你能帮我带点案件调查方向吗?
你是什么意思,它不起作用?你一遍又一遍地插入这条记录吗?你究竟通过SELECT检查了什么? – phact 2015-03-02 14:41:20
什么是密钥空间复制因子?插入一致性级别是什么?什么是你的阅读一致性水平? – 2015-03-02 21:52:10
@phact,是的,我将记录插入现有密钥(实际上使用插入语法进行更新)并通过主键进行选择。反复在大约一半的情况下插入不报告任何问题,但随之而来的选择显示没有更新的记录 – 2015-03-03 15:32:43