cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <>
Subject Re: Performance of get
Date Tue, 27 Oct 2009 18:35:01 GMT
On Tue, Oct 27, 2009 at 12:20 PM, Christopher McKenzie
<> wrote:
> Checking for existence, a normal control flow operation, requires using a
> try/catch method, which are not intended for normal control flow.

That was conventional wisdom in the '80s.  Less so today.  (Along with
gems like "there should only be one return point from any function."
Remember that one?)

> My experience with PHP has shown that interrupts come at a cost of about 200
> times that of a type check.
> Could Get possibly return a reserved value instead?

Sorry, it's not worth breaking everyone's existing code to accommodate
the PHP vm sucking.

Have you actually tested to make sure it's not fast "enough?"  I'm
really skeptical that even with a terrible exception design, this will
be the bottleneck compared with network + cassandra latency + the rest
of your code.

If it really is your bottleneck, you have a couple options:
 - use get_slice, which will return an empty list instead of throwing
NFE [the thrift interface declares that it throws, but this is wrong,
I will fix it]
 - use python; we just did some testing with a miss-dominated workload
and the client was not a bottleneck even at 20000+ req/s


View raw message