背景: 我的应用程序在集群系统(有4个节点)上运行,这四个节点的系统时间由NTP同步。我使用Write.QUORUM和Read.QUORUM策略。这个问题的概率不是很高。 Cassandra版本是1.0.3,我已经尝试过Cassandra 1.1.1,这个问题仍然存在。
问题: 我删除了一个列,但是在6秒之后,Cassandra仍然可以得到“isMarkedForDelete”仍然是假的旧记录。
有人遇到同样的问题吗?以及如何解决?
明细:请参阅以下日志:
节点3(本地节点):
[pool-2-thread-42] 2012-06-27 14:49:23,732 SliceQueryFilter.java(第123行)收集0的2147483647:SuperColumn(667072 [...... {{ 1}}: false :36 @ 1340779097312016,......)
[pool-2-thread-44] 2012-06-27 14:51:21,367 StorageProxy.java(第172行)Mutations / ConsistencyLevel是[RowMutation(keyspace ='drc',key ='3332',修改= [ColumnFamily(fpr_index [SuperColumn(667072 [7fffffffffffffff000001382ca96c8b636b698a
: true :4 @ 1340779881338000,]),])])] / QUORUM
- 我在14:51:21,367删除了这条记录
[pool-2-thread-37] 2012-06-27 14:51:27,400 SliceQueryFilter.java(第123行)收集了2147483647的0:SuperColumn(667072 [..... 。,7fffffffffffffff000001382ca96c8b636b698a
: false :36 @ 1340779097312016,......)
- 但我仍然可以在14:51:27,400
获得旧记录
节点2:
[MutationStage:118] 2012-06-27 14:51:21,373 RowMutationVerbHandler.java(第48行)应用RowMutation(keyspace ='drc',key ='3332',修改= [ColumnFamily(fpr_index) [SuperColumn(667072 [7fffffffffffffff000001382ca96c8b636b698a
: true :4 @ 1340779881338000,]),])])
[MutationStage:118] 2012-06-27 14:51:21,374 RowMutationVerbHandler.java(第60行)RowMutation(keyspace ='drc',key ='3332',修改= [ColumnFamily (fpr_index [SuperColumn(667072 [7fffffffffffffff000001382ca96c8b636b698a
: true :4 @ 1340779881338000,]),])])已应用。发送回复6692098@/192.168.0.3
[MutationStage:123] 2012-06-27 14:51:27,405 RowMutationVerbHandler.java(第48行)应用RowMutation(keyspace ='drc',key ='3332',修改= [ColumnFamily(fpr_index [SuperColumn(66) [......,7fffffffffffffff000001382ca96c8b636b698a
: false :36 @ 1340779097312016,......])
[MutationStage:123] 2012-06-27 14:51:27,405 RowMutationVerbHandler.java(第60行)RowMutation(keyspace ='drc',key ='3332',修改= [ColumnFamily (fpr_index [SuperColumn(667072 [......,7fffffffffffffff000001382ca96c8b636b698a
: false :36 @ 1340779097312016,.......]),])])已应用。发送回复6698516@/192.168.0.3
节点1:
[MutationStage:98] 2012-06-27 14:51:24,661 RowMutationVerbHandler.java(第48行)应用RowMutation(keyspace ='drc',key ='3332',修改= [ColumnFamily(fpr_index) [SuperColumn(667072 [7fffffffffffffff000001382ca96c8b636b698a
: true :4 @ 1340779881338000,]),])])
[MutationStage:98] 2012-06-27 14:51:24,675 RowMutationVerbHandler.java(第60行)RowMutation(keyspace ='drc',key ='3332',修改= [ColumnFamily (fpr_index [SuperColumn(667072 [7fffffffffffffff000001382ca96c8b636b698a
: true :4 @ 1340779881338000,]),])])已应用。发送回复6692099@/192.168.0.3
[MutationStage:93] 2012-06-27 14:51:40,932 RowMutationVerbHandler.java(第48行)应用RowMutation(keyspace ='drc',key ='3332',修改= [ ColumnFamily(fpr_index [SuperColumn(667072 [7fffffffffffffff000001382ca96c8b636b698a
: true :4 @ 1340779900915004,]),])])
DEBUG [MutationStage:93] 2012-06-27 14:51:40,933 RowMutationVerbHandler.java(第60行)RowMutation(keyspace ='drc',key ='3332',修改= [ ColumnFamily(fpr_index [SuperColumn(667072 [7fffffffffffffff000001382ca96c8b636b698a
: true :4 @ 1340779900915004,]),])])已应用。发送回复6706555@/192.168.0.3
[ReadStage:55] 2012-06-27 14:51:43,074 SliceQueryFilter.java(第123行)收集0 of 5000:7fffffffffffffff000001382ca96c8b636b698a
: true :4 @ 1340779900915004
节点4:
节点4上没有关于此记录的日志。
答案 0 :(得分:0)
最好避免依赖卡桑德拉的删除,因为它们通常不可靠。
请参阅http://www.slideshare.net/planetcassandra/8-axel-liljencrantz-23204252(特别是幻灯片34)。强制进行重大压缩可能会解决问题。