You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Mike Adamson (JIRA)" <ji...@apache.org> on 2015/06/09 16:30:01 UTC

[jira] [Updated] (CASSANDRA-9570) Deprecated forceRepairAsync methods in StorageService do not work

     [ https://issues.apache.org/jira/browse/CASSANDRA-9570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Adamson updated CASSANDRA-9570:
------------------------------------
    Description: 
The deprecated forceRepairAsync methods in StorageService don't work because they are creating RepairOption as follows:
{noformat}
        RepairOption options = new RepairOption(parallelism, primaryRange, 
                     !fullRepair, false, 1, Collections.<Range<Token>>emptyList());
{noformat}
This creates a RepairOption with an empty token range. The methods call down to:
{noformat}
    public int forceRepairAsync(String keyspace, RepairOption options)
    {
        if (options.getRanges().isEmpty() || 
           Keyspace.open(keyspace).getReplicationStrategy().getReplicationFactor() < 2)
            return 0;

        int cmd = nextRepairCommand.incrementAndGet();
        new Thread(createRepairTask(cmd, keyspace, options)).start();
        return cmd;
    }
{noformat}
to run the repair and this returns 0 because option ranges are empty.


  was:
The deprecated forceRepairAsync methods in StorageService don't work because they are creating RepairOption as follows:
{noformat}
        RepairOption options = new RepairOption(parallelism, primaryRange, !fullRepair, false, 1, Collections.<Range<Token>>emptyList());
{noformat}
This creates a RepairOption with an empty token range. The methods call down to:
{noformat}
    public int forceRepairAsync(String keyspace, RepairOption options)
    {
        if (options.getRanges().isEmpty() || Keyspace.open(keyspace).getReplicationStrategy().getReplicationFactor() < 2)
            return 0;

        int cmd = nextRepairCommand.incrementAndGet();
        new Thread(createRepairTask(cmd, keyspace, options)).start();
        return cmd;
    }
{noformat}
to run the repair and this returns 0 because option ranges are empty.



> Deprecated forceRepairAsync methods in StorageService do not work
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-9570
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9570
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Mike Adamson
>             Fix For: 2.2.0 rc2
>
>
> The deprecated forceRepairAsync methods in StorageService don't work because they are creating RepairOption as follows:
> {noformat}
>         RepairOption options = new RepairOption(parallelism, primaryRange, 
>                      !fullRepair, false, 1, Collections.<Range<Token>>emptyList());
> {noformat}
> This creates a RepairOption with an empty token range. The methods call down to:
> {noformat}
>     public int forceRepairAsync(String keyspace, RepairOption options)
>     {
>         if (options.getRanges().isEmpty() || 
>            Keyspace.open(keyspace).getReplicationStrategy().getReplicationFactor() < 2)
>             return 0;
>         int cmd = nextRepairCommand.incrementAndGet();
>         new Thread(createRepairTask(cmd, keyspace, options)).start();
>         return cmd;
>     }
> {noformat}
> to run the repair and this returns 0 because option ranges are empty.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)