Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-9570

Deprecated forceRepairAsync methods in StorageService do not work

    XMLWordPrintableJSON

Details

    • Normal

    Description

      The deprecated forceRepairAsync methods in StorageService don't work because they are creating RepairOption as follows:

              RepairOption options = new RepairOption(parallelism, primaryRange, !fullRepair, false, 1, Collections.<Range<Token>>emptyList());
      

      This creates a RepairOption with an empty token range. The methods call down to:

          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;
          }
      

      to run the repair and this returns 0 because option ranges are empty.

      Attachments

        Activity

          People

            yukim Yuki Morishita
            mike_tr_adamson Mike Adamson
            Yuki Morishita
            Marcus Eriksson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: