[ 
https://issues.apache.org/jira/browse/CASSANDRA-6218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13835099#comment-13835099
 ] 

Lyuben Todorov commented on CASSANDRA-6218:
-------------------------------------------

If the local DC's name is missed out in the csv list supplied as a param then 
an IllegalArgumentException is thrown, but to save us having to throw the 
IllegalArgumentException n number of times (based on how many ranges the dc 
has) we could cancel the repair. 

A few  tiny nits: 
There are a few cases where the parenthesis are on the same line as the code 
(should be on the next line)
{code}
// ActiveRepairService#getNeighbors
for (String dc : dataCenters) {

// StorageService#forceRepairAsync (overload 1)
public int forceRepairAsync(final String keyspace, final boolean isSequential, 
final Collection<String> dataCenters, final boolean primaryRange, final 
String... columnFamilies) {

// StorageService#forceRepairAsync (overload 2)
public int forceRepairAsync(final String keyspace, final boolean isSequential, 
final Collection<String> dataCenters, final Collection<Range<Token>> ranges, 
final String... columnFamilies) {

// StorageService#createRepairTask
if (isLocal) {
{code}

Also resources.o.a.c.cli.CliHelp.yaml should be updated to show the new *in_dc* 
/ *in* param.

> Reduce WAN traffic while doing repairs
> --------------------------------------
>
>                 Key: CASSANDRA-6218
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6218
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core, Tools
>            Reporter: sankalp kohli
>            Priority: Minor
>             Fix For: 2.0.4
>
>         Attachments: trunk-6218.txt
>
>
> The way we send out data that does not match over WAN can be improved. 
> Example: Say there are four nodes(A,B,C,D) which are replica of a range we 
> are repairing. A, B is in DC1 and C,D is in DC2. If A does not have the data 
> which other replicas have, then we will have following streams
> 1) A to B and back
> 2) A to C and back(Goes over WAN)
> 3) A to D and back(Goes over WAN)
> One of the ways of doing it to reduce WAN traffic is this.
> 1) Repair A and B only with each other and C and D with each other starting 
> at same time t. 
> 2) Once these repairs have finished, A,B and C,D are in sync with respect to 
> time t. 
> 3) Now run a repair between A and C, the streams which are exchanged as a 
> result of the diff will also be streamed to B and D via A and C(C and D 
> behaves like a proxy to the streams).
> For a replication of DC1:2,DC2:2, the WAN traffic will get reduced by 50% and 
> even more for higher replication factors. 
>  



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to