当我从具有计数器的表中选择并按分区键过滤时,我的Cassandra集群(2个节点)总是超时。
cqlsh:test> select count(*) from costs_by_domain_and_format;
count
-------
2231
因此,它几乎没有数据(2K行)。当我查询它时:
cqlsh:test> select * from costs_by_domain_and_format where flight_id=6f0753b5-858d-44a0-a321-ce4f5869f58f;
Request did not complete within rpc_timeout.
总是暂停。当我启用跟踪时,似乎它发生在合并来自memtables和sstables的数据中:
Merging data from memtables and 4 sstables | 10:16:17,907 | xx.xx.xx.xx | 5600
Timed out; received 0 of 1 responses | 10:16:27,906 | xx.xx.xx.xx | 10004599
没有WHERE子句查询此表没有问题,例如:
select * from costs_by_domain_and_format;
表格结构如下所示:
CREATE TABLE costs_by_domain_and_format (
flight_id uuid,
domain text,
span_date timestamp,
format text,
cost counter,
counter counter,
PRIMARY KEY (flight_id, domain, span_date, format)
) 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'};
这个问题的根源在哪里?是不正当使用柜台?或者可能不正确的桌面设计或者这可能是Cassandra中的一些已知问题(我使用v1.2.10)??