cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Wille <>
Subject LOCAL_* consistency levels
Date Tue, 14 Oct 2014 12:39:52 GMT
I’m wondering if there’s a best practice for an annoyance I’ve come across.

Currently all my environments (dev, staging and live) have a single DC. In the future my live
environment will most likely have a second DC. When that happens, I’ll want to use LOCAL_*
consistency levels. However, if I write my code with LOCAL_* consistency levels, an exception
is thrown. I’ve forgotten the exact verbiage, but its something about having a NetworkTopologyStrategy
that doesn’t support local consistency levels. t don’t really want to change all my queries
when I have a second DC, nor do I want to check my environment for every query. Is there a
nice way to use LOCAL_* consistency levels and have Cassandra do the appropriate thing when
there is a single DC?

Thanks in advance


View raw message