Updated Branches: refs/heads/cassandra-1.2.0 6fb751240 -> 64bc3354d
Document that list append/prepend are not idempotent and should be used with care Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/64bc3354 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/64bc3354 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/64bc3354 Branch: refs/heads/cassandra-1.2.0 Commit: 64bc3354d34bef9cff5a511f0045266f2c44f962 Parents: 6fb7512 Author: Sylvain Lebresne <sylv...@datastax.com> Authored: Fri Nov 23 15:36:34 2012 +0100 Committer: Sylvain Lebresne <sylv...@datastax.com> Committed: Fri Nov 23 15:36:34 2012 +0100 ---------------------------------------------------------------------- doc/cql3/CQL.textile | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/64bc3354/doc/cql3/CQL.textile ---------------------------------------------------------------------- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index 931aa18..452407b 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -829,6 +829,8 @@ bc(sample). UPDATE plays SET players = 5, scores = scores + [ 14, 21 ] WHERE id = '123-afde'; UPDATE plays SET players = 5, scores = [ 12 ] + scores WHERE id = '123-afde'; +It should be noted that append and prepend are not idempotent operations. This means that if during an append or a prepend the operation timeout, it is not always safe to retry the operation (as this could result in the record appended or prepended twice). + Lists also provides the following operation: setting an element by its position in the list, removing an element by its position in the list and remove all the occurrence of a given value in the list. _However, and contrarily to all the other collection operations, these three operations induce an internal read before the update, and will thus typically have slower performance characteristics_. Those operations have the following syntax: bc(sample).