基于时间戳查询的Cassandra ReadTimeoutException

时间:2016-09-02 07:49:06

标签: cassandra cql

我有Cassandra db表记录

create table records (
id text,
cachedtime timestamp,
data list<frozen<RecordType>>,
PRIMARY KEY (id, cachedtime)       
AND CLUSTERING ORDER BY (cachedtime DESC);

RecordType是UDT,cachedtime是群集密钥,每条记录的TTL是60分钟。

我们正在查询ReadTimeoutException,查询下面的选择查询,其一致性级别为LOCAL_QUORUM,复制因子为2。

select * from records where id= "11" and cachedTime < now 

com.datastax.driver.core.exceptions.ReadTimeoutException: Cassandra   
timeout during read query at consistency LOCAL_QUORUM (2 responses were 
required but only 1 replica responded) 

任何人都可以帮助我,为什么我会遇到这个例外。请同时根据timstamp建议查询没有下限会导致性能问题吗?

请告知

0 个答案:

没有答案