del cassandra cli有时不起作用

时间:2014-11-01 05:17:40

标签: cassandra cassandra-2.0 cassandra-cli

cassandra中的del命令有时无效。

  [default@ran] get private[7d024b55fbe7e3a0064b3613c635dd8]; 
    => (name=1, value=1414818289748, timestamp=1414818321277000)
    => (name=2, value=1414809690283, timestamp=1414816876801000)
    => (name=3, value=1414809773084, timestamp=1414816882177000)
    => (name=4, value=1414809715931, timestamp=1414816886825000)
    => (name=5, value=1414809793752, timestamp=1414816891209000)
    => (name=20141101050451971, value=1414817296432, timestamp=1414818321277001)
    Returned 6 results.
    Elapsed time: 13 msec(s).
    [default@rankq] del private[7d024b55fbe7e3a0064b3613c635dd8][20141101050451971]; 
    cell removed.
    Elapsed time: 2.44 msec(s).
    [default@ran] get private[7d024b55fbe7e3a0064b3613c635dd8]; 
    => (name=1, value=1414818289748, timestamp=1414818321277000)
    => (name=2, value=1414809690283, timestamp=1414816876801000)
    => (name=3, value=1414809773084, timestamp=1414816882177000)
    => (name=4, value=1414809715931, timestamp=1414816886825000)
    => (name=5, value=1414809793752, timestamp=1414816891209000)
    => (name=20141101050451971, value=1414817296432, timestamp=1414818321277001)
    Returned 6 results.
    Elapsed time: 12 msec(s).

我只是多次尝试删除它但不能正常工作,并且在多次工作后突然发生。 这是cassandra cli的错误吗?

1 个答案:

答案 0 :(得分:0)

我猜这是一个一致性问题。 cli中所有r / w操作的默认一致性级别为ONE,因此,如果您正在处理多个节点实例,则可能会获得旧数据。尝试在cassandra-cli中执行此操作:

consistencylevel AS Quorum;

然后重复删除/读取操作。

HTH, 卡罗