【发布时间】:2015-02-07 05:13:26
【问题描述】:
我正在使用带有预安装默认设置的 DataStax Community v 2.1.2-1 (AMI v 2.5)+ 将读取时间增加到 10 秒,这是问题
create table simplenotification_ttl (
user_id varchar,
real_time timestamp,
insert_time timeuuid,
read boolean,
msg varchar, PRIMARY KEY (user_id, real_time, insert_time));
插入查询:
insert into simplenotification_ttl (user_id, real_time, insert_time, read)
values ('test_3',14401440123, now(),false) using TTL 800;
对于相同的“test_3”,我插入了 33,000 个元组。 [24,000 个元组不会出现这个问题]
渐渐地我明白了
cqlsh:notificationstore> select count(*) from simplenotification_ttl where user_id = 'test_3';
count
-------
15681
(1 rows)
cqlsh:notificationstore> select count(*) from simplenotification_ttl where user_id = 'test_3';
count
-------
12737
(1 rows)
cqlsh:notificationstore> select count(*) from simplenotification_ttl where user_id = 'test_3';
**errors={}, last_host=127.0.0.1**
即使在不同的桌子上,我也已经多次尝试过。一旦发生这种情况,即使我使用相同的 user_id 插入并使用限制 1 进行检索。它会超时。
我需要 TTL 才能正常工作,即在推测时间后给出计数 0。如何解决这个问题? 谢谢
[我的其他节点相关设置是使用 m3.large 和 2 个节点 EC2Snitch]
【问题讨论】:
-
如果我想查询排除已删除的区域,它可以工作。例如:select * from simplenotification where user_id = 'test_3' and time
标签: amazon-ec2 cassandra cql3 datastax ttl