Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Correctness - API / Semantic Implementation
-
Low
-
Low Hanging Fruit
-
User Report
-
All
-
None
-
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.