dcapwell commented on code in PR #2660:
URL: https://github.com/apache/cassandra/pull/2660#discussion_r1327775890


##########
src/java/org/apache/cassandra/service/ActiveRepairService.java:
##########
@@ -213,25 +224,31 @@ public static ExecutorPlus repairCommandExecutor()
         return RepairCommandExecutorHandle.repairCommandExecutor;
     }
 
-    private final IFailureDetector failureDetector;
-    private final Gossiper gossiper;
     private final Cache<Integer, Pair<ParentRepairStatus, List<String>>> 
repairStatusByCmd;
+    public final ExecutorPlus snapshotExecutor;
 
-    public final ExecutorPlus snapshotExecutor = 
executorFactory().configurePooled("RepairSnapshotExecutor", 1)
-                                                                  
.withKeepAlive(1, TimeUnit.HOURS)
-                                                                  .build();
+    public ActiveRepairService()
+    {
+        this(SharedContext.Global.instance, 
CompactionManager.instance::getPendingTasks);
+    }
 
-    public ActiveRepairService(IFailureDetector failureDetector, Gossiper 
gossiper)
+    @VisibleForTesting
+    public ActiveRepairService(SharedContext ctx,
+                               IntSupplier pendingTasks)

Review Comment:
   I didn't do `CompactionManager` as I need to be able to stub it out in 
testing, but I did create a new `ICompactionManager` and expose `int 
getPendingTasks();`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to