incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: NotFoundException thrown for get(), but not get_slice() with a column_names predicate
Date Thu, 28 Jul 2011 12:45:00 GMT
No, the slice semantics are "give me whatever happens to exist between
start and end."  It's valid for the answer to be "nothing."

On Thu, Jul 28, 2011 at 6:55 AM, David Allsopp <dnallsopp@gmail.com> wrote:
> If I try to retrieve a column that is not present, using get(), then I'll
> get a NotFoundException.
>
> If (for efficiency's sake) I try to retrieve several named columns using
> get_slice, with a column_names predicate (i.e. a list of columns) then I
> won't get the exception if one of those columns is missing, I think?
>
> This seems inconsistent - would it make sense for get_slice to throw the
> exception too, or perhaps have an option to require all columns to be
> present?
>
>
> The reason this came up is that I write and read with CL.ONE, and retry at
> the client side in case of (very occasional) failures, with the aim of
> improving availability and performance by avoiding CL.QUORUM etc.
> This is easy in the get() case - I can just retry a few times if I get a
> NotFoundException. I normally only need to retry once, in less than 0.1% of
> cases.
>
> For the get_slice case I'd need to retrieve all the columns again (might be
> wasteful) or check which ones were returned and form a new request (seems
> overly complex) or give up using get_slice and just use individual get()
> calls (seems inefficient).
>
> See also https://issues.apache.org/jira/browse/CASSANDRA-518
>
> Thanks,
>
> David.
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Mime
View raw message