You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Aleksandr Ivanov <al...@gmail.com> on 2017/09/10 20:28:21 UTC

disable reads from node till hints are fully synced

Hello,

from time to time we have situations where node is down for longer period
(but less than max_hint_window_in_ms). After node is up and hints are
activly syncing to affected node, clients get inconsistent data (client
uses LOCAL_ONE consistency due to performance reasons).

Is any way exist to disable reads from such node till hints are fully
synced?

Regards,
Aleksandr

Re: disable reads from node till hints are fully synced

Posted by laxmikanth sadula <la...@gmail.com>.
Hi,

If you are using datastax java driver, I think this might work.

http://docs.datastax.com/en/latest-java-driver-api/com/datastax/driver/core/policies/WhiteListPolicy.html

On Sep 11, 2017 2:28 AM, "Jeff Jirsa" <jj...@gmail.com> wrote:

> There's not - you can disable native/binary to make it less likely, but
> you can't stop reads entirely because you need gossip up in order to have
> hints deliver
>
> What you can do is use severity to make the dynamic snitch MUCH less
> likely to pick that node (and disable binary so it's not a coordinator).
> That often works for what you're trying to do, though it's imperfect.
> Brandon described this a bit here:
>
> https://www.datastax.com/dev/blog/dynamic-snitching-in-
> cassandra-past-present-and-future
>
>
>
> --
> Jeff Jirsa
>
>
> On Sep 10, 2017, at 1:28 PM, Aleksandr Ivanov <al...@gmail.com> wrote:
>
> Hello,
>
> from time to time we have situations where node is down for longer period
> (but less than max_hint_window_in_ms). After node is up and hints are
> activly syncing to affected node, clients get inconsistent data (client
> uses LOCAL_ONE consistency due to performance reasons).
>
> Is any way exist to disable reads from such node till hints are fully
> synced?
>
> Regards,
> Aleksandr
>
>

Re: disable reads from node till hints are fully synced

Posted by Jeff Jirsa <jj...@gmail.com>.
There's not - you can disable native/binary to make it less likely, but you can't stop reads entirely because you need gossip up in order to have hints deliver

What you can do is use severity to make the dynamic snitch MUCH less likely to pick that node (and disable binary so it's not a coordinator). That often works for what you're trying to do, though it's imperfect. Brandon described this a bit here: 

https://www.datastax.com/dev/blog/dynamic-snitching-in-cassandra-past-present-and-future



-- 
Jeff Jirsa


> On Sep 10, 2017, at 1:28 PM, Aleksandr Ivanov <al...@gmail.com> wrote:
> 
> Hello,
> 
> from time to time we have situations where node is down for longer period (but less than max_hint_window_in_ms). After node is up and hints are activly syncing to affected node, clients get inconsistent data (client uses LOCAL_ONE consistency due to performance reasons).
> 
> Is any way exist to disable reads from such node till hints are fully synced?
> 
> Regards,
> Aleksandr