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

Fix errors on repairing empty keyspace

    XMLWordPrintableJSON

Details

    Description

      Running repairs on empty keyspaces will produce a rather confusing error in trunk:

      ERROR [Repair-Task:1] 2019-05-24 10:36:20,323 RepairRunnable.java:274 - Repair 014607d0-7dff-11e9-9256-158db058ccc5 failed:
      java.lang.IllegalArgumentException: repair sessions cannot operate on multiple keyspaces
      ▸  at com.google.common.base.Preconditions.checkArgument(Preconditions.java:135)
      ▸  at org.apache.cassandra.service.ActiveRepairService$ParentRepairSession.<init>(ActiveRepairService.java:566)
      ▸  at org.apache.cassandra.service.ActiveRepairService.registerParentRepairSession(ActiveRepairService.java:484)
      ▸  at org.apache.cassandra.service.ActiveRepairService.prepareForRepair(ActiveRepairService.java:395)
      ▸  at org.apache.cassandra.repair.RepairRunnable.runMayThrow(RepairRunnable.java:269)
      ▸  at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
      ▸  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      ▸  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      ▸  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      ▸  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      ▸  at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
      ▸  at java.lang.Thread.run(Thread.java:748)
      

      Let's ignore empty keyspaces and return a success return status instead.

      Attachments

        Activity

          People

            spod Stefan Podkowinski
            spod Stefan Podkowinski
            Stefan Podkowinski
            Michael Semb Wever
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: