cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Evans (Commented) (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-2475) Prepared statements
Date Wed, 14 Dec 2011 22:35:31 GMT


Eric Evans commented on CASSANDRA-2475:

bq. Thanks Eric, for all the help and attention to detail! I learned a lot. I'll be tuning
up my formatter (Eclipse) to handle the nits of formatting and white-space. And I'll try to
break things up much finer in future large patches

Thank you for knocking this out!

bq. I'm still a bit iffy about having the server ditching entries in the prepared statement
map without regard to whether the client side closed the associated PreparedStatement. But
like you, I think the chances of ever seeing 50 entries without closing the connection are

Think about it this way: whether or not the client removes unused entries, it's still prudent
to put a limit on the number of statements we cache, otherwise a buggy client could eat up
our heap.  And, if you're going to put something in place to evict, choosing the least recently
accessed seems like the safest approach.

The question then becomes, how many can we afford to hang onto, and what is the likelihood
that, short of a buggy client, we won't be able to accommodate everything needed.  Remember,
this is only for the life of a connection, reconnecting starts a whole new Map.  So if an
API to remove entries is ultimately of little to no benefit, then we should save everyone
the trouble of implementing and maintaining it.

And, we could always take this to a wider audience to see what others think, but it's easier
to add something like this later than it is to remove (or fix) it.

Also, 50 might not be the right number.  I basically pulled that out of my butt.
> Prepared statements
> -------------------
>                 Key: CASSANDRA-2475
>                 URL:
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API, Core
>    Affects Versions: 1.0.5
>            Reporter: Eric Evans
>            Assignee: Rick Shaw
>            Priority: Minor
>              Labels: cql
>             Fix For: 1.1
>         Attachments: 2475-v1.patch, 2475-v2.patch, 2475-v3.1.patch, 2475-v3.2-Thrift.patch,
v1-0001-CASSANDRA-2475-prepared-statement-patch.txt, v1-0002-regenerated-thrift-java.txt,
v2-0001-CASSANDRA-2475-rickshaw-2475-v3.1.patch.txt, v2-0002-rickshaw-2475-v3.2-Thrift.patch-w-changes.txt,
v2-0003-eevans-increment-thrift-version-by-1-not-3.txt, v2-0004-eevans-misc-cleanups.txt,
v2-0005-eevans-refactor-for-better-encapsulation-of-prepare.txt, v2-0006-eevans-log-queries-at-TRACE.txt,

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message