adelapena commented on a change in pull request #1021:
URL: https://github.com/apache/cassandra/pull/1021#discussion_r648428310



##########
File path: test/unit/org/apache/cassandra/service/ActiveRepairServiceTest.java
##########
@@ -376,8 +384,20 @@ public void testRejectWhenPoolFullStrategy() throws 
InterruptedException
         {
             Condition blocked = new SimpleCondition();
             CountDownLatch completed = new CountDownLatch(2);
+
+            /*
+             * CASSANDRA-16685 When the underlying executor's queue is a 
SynchronousQueue, there can be races just after
+             * the ThreadPool's initialization while juggling and spinning up 
threads internally leading to false
+             * rejections. That queue needs a thread ready to pick up the task 
immediately or it will produce a reject
+             * exception upon 'offer()' method call on the executor's code. If 
the executor is still initializing or
+             * threads are not ready to take work you can get false rejections.
+             *
+             * A sleep has been added to give time to the thread pool to be 
ready to get work.
+             */

Review comment:
       If this is a Java bug maybe we could explicitly mention it here




-- 
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.

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