cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuki Morishita (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-7450) Make repair -pr work within a datacenter
Date Sat, 13 Sep 2014 22:17:34 GMT


Yuki Morishita commented on CASSANDRA-7450:

* I think it is better to name {{getPrimaryRangeForEndpointWithinDC}} than {{getLocalPrimaryRangeForEndpoint}}
* I think you can simplify this to include {{Range}} s that given {{referenceEndpoint}} is
not the primary endpoint but is replica for that range. That is:

List<InetAddress> endpoints = strategy.calculateNaturalEndpoints(token, metadata);
if (endpoints.size() > 0 && !endpoints.get(0).equals(ep) && endpoints.contains(ep))
    primaryRanges.add(new Range<>(metadata.getPredecessor(token), token));

* Wrapped range is handled in {{Range}} object so you don't need last {{for}} loop. (Sorry
if I told it wrong.)
* Nice if you can add unit test for {{getLocalPrimaryRangeForEndpoint}} to StorageServiceServerTest
like {{getPrimaryRangeForEndpoint}}.

> Make repair -pr work within a datacenter
> ----------------------------------------
>                 Key: CASSANDRA-7450
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Paulo Motta
>              Labels: bootcamp, repair
>             Fix For: 2.1.1
>         Attachments: 2.1-CASSANDRA-7450-v1.txt
> As was noticed in CASSANDRA-7317, using '-pr' alongside '-local' for repair doesn't really
work properly, and disabling the combination was definitively the right short time fix. However,
the main goal of '-pr' is to make it easy to repair a full cluster without doing any duplication
of work. Doing the same only within a data-center is obviously desirable.
> I think a reasonably simple solution would be modify the behavior of '-pr' when it's
limited to only one DC. If applied to nodeX in dcY, instead of repairing only the "primary"
range of nodeX for the whole ring, we'll repair that range but also all ranges that are "primary"
for a node not in dcY and for which nodeX is the first node of dcY found in ring order. Basically
we'll ensure that running 'repair -local -pr' on every nodes of a given DC will repair all
ranges for the nodes of that DC without repairing the same range twice.

This message was sent by Atlassian JIRA

View raw message