cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lyuben Todorov (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6157) Selectively Disable hinted handoff for a data center
Date Mon, 13 Jan 2014 13:05:52 GMT


Lyuben Todorov commented on CASSANDRA-6157:

+1 on the python set literals {{{'dc1', 'dc2'}}}, we will however have to wrap them in quotes
to keep snake yaml happy and so end up with {{"{'dc1', 'dc2'}"}}. This will require some extra
parsing on our end to strip the *'* however it will allow for spaces in DC names. As for DCs
with comma names, where we split the parameter supplied we can use regular expressions to
only split on commas that are outside of the single quotation marks above, eg:

// in cassandra.yaml we have = hinted_handoff_enabled: "{'DC1','DC,2'}"
final String [] dcs = hinted_handoff_enabled.substring(1, hinted_handoff_enabled.length()
- 1).split(",(?=([^']*'[^']*')*[^']*$)");
for(final String dc : dcs)
    System.out.println(" DC  => " + dc);

// Output
// DC  => 'DC1'
// DC  => 'DC,2'

> Selectively Disable hinted handoff for a data center
> ----------------------------------------------------
>                 Key: CASSANDRA-6157
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: sankalp kohli
>            Assignee: sankalp kohli
>            Priority: Minor
>             Fix For: 2.0.5
>         Attachments: trunk-6157-v2.diff, trunk-6157-v3.diff, trunk-6157-v4.diff, trunk-6157.txt
> Cassandra supports disabling the hints or reducing the window for hints. 
> It would be helpful to have a switch which stops hints to a down data center but continue
hints to other DCs.
> This is helpful during data center fail over as hints will put more unnecessary pressure
on the DC taking double traffic. Also since now Cassandra is under reduced reduncany, we don't
want to disable hints within the DC. 

This message was sent by Atlassian JIRA

View raw message