cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CASSANDRA-6509) CQL collection list throws error on delete (hiding the error will help)
Date Wed, 03 Jun 2015 10:08:50 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-6509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Aleksey Yeschenko resolved CASSANDRA-6509.
------------------------------------------
    Resolution: Not A Problem

The batch is not actually helping here, even in the case of batching with the same exact partition
key, much.

Switch to using asynchronous writes instead.

> CQL collection list throws error on delete (hiding the error will help)
> -----------------------------------------------------------------------
>
>                 Key: CASSANDRA-6509
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6509
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Pardeep Singh
>            Priority: Minor
>              Labels: cql
>
> Currently as of CQL 3.1, collection list query throws error.
> DELETE scores[1] FROM plays WHERE id = '123-afde';                   // deletes the 2nd
element of scores (raises an error is scores has less than 2 elements)
> The above query is not an issue for single queries since I can ignore the error. But
if I do a batch, the query will fail and the batch will fail also.
> I was trying to accomplish this:
> BEGIN UNLOGGED BATCH
>     UPDATE plays SET scores=[2]+scores WHERE id='aaa';
>     UPDATE plays SET scores=[2]+scores WHERE id='bbb';
>     DELETE scores[500] FROM plays WHERE id = 'aaa';
>     DELETE scores[500] FROM plays WHERE id = 'bbb';
> APPLY BATCH;
> My main goal is to keep a list of 500 recent posts, delete the rest. I'm prepending to
the list, then deleting from the end of the list. I can deal with it if the list is not exact
500 posts, the point is to keep it close to that number.
> I'm doing this in bulk so using UNLOGGED BATCH helps reduce latency.
> It would help, even if you can provide a way to bypass the delete list error using some
special directive so the BATCH can still be processed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message