Cassandra - 删除的数据仍然存在 [英] Cassandra - deleted data still there
问题描述
Cassandra版本:1.2.6。单个节点。
Cassandra version: 1.2.6. Single node.
我已从表中删除数据
DELETE FROM mytable WHERE symbol = 'symbol1' AND field = 'field1';
,并且以下查询不返回:
and the following query does not return it:
SELECT符号,ts,值FROM mytable WHERE symbol IN('symbol1');
一些不同的,更严格的查询仍返回旧的(删除的)数据:
However, some different, more restrictive queries still return the old (deleted) data:
SELECT symbol, ts, value FROM mytable WHERE symbol IN ('symbol1') AND field='field1' AND ts >= '2013-09-04 00:00:00+0000' AND ts <= '2014-09-25 00:00:00+0000';
数据没有立即重现,只有大约5-10分钟后,
The data didn't reappear instantly but only after around 5-10 minutes, after few additional rows were added to the table for that symbol/field.
我运行: nodetool修复mykeyspace
但它没有帮助。任何想法如何解决它?
But it didn't help. Any ideas how to fix it?
我的表模式:
CREATE TABLE mytable (
symbol text,
field text,
ts timestamp,
value double,
PRIMARY KEY (symbol, field, ts)
) WITH
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'SnappyCompressor'};
推荐答案
其他墓碑问题,听起来像你有一个: https:// issues。 apache.org/jira/browse/CASSANDRA-7810
This problem, fixed in 1.2.19 along with a couple of other tombstone issues, sounds like the one you're having: https://issues.apache.org/jira/browse/CASSANDRA-7810
如果你愿意尝试,你会考虑升级吗?对于Cassandra 1.2.x,有相当多的修改/修复与删除的数据相关: https://github.com/apache/cassandra/blob/cassandra-1.2/CHANGES.txt
If you're willing to experiment, would you consider upgrading? There are quite a few changes/fixes for Cassandra 1.2.x related to deleted data: https://github.com/apache/cassandra/blob/cassandra-1.2/CHANGES.txt
这篇关于Cassandra - 删除的数据仍然存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!