blerer commented on a change in pull request #482: CASSANDRA-15650 Fix flaky 
test org.apache.cassandra.distributed.test.*RepairCoordinatorFastTest
URL: https://github.com/apache/cassandra/pull/482#discussion_r399164975
 
 

 ##########
 File path: src/java/org/apache/cassandra/tools/RepairRunner.java
 ##########
 @@ -59,19 +64,38 @@ public void run() throws Exception
         if (cmd <= 0)
         {
             // repairAsync can only return 0 for replication factor 1.
-            String message = String.format("[%s] Replication factor is 1. No 
repair is needed for keyspace '%s'", format.format(System.currentTimeMillis()), 
keyspace);
-            out.println(message);
+            String message = String.format("Replication factor is 1. No repair 
is needed for keyspace '%s'", keyspace);
+            printMessage(message);
         }
         else
         {
-            while 
(!condition.await(NodeProbe.JMX_NOTIFICATION_POLL_INTERVAL_SECONDS, 
TimeUnit.SECONDS))
+            String previousName = Thread.currentThread().getName();
+            try
             {
-                queryForCompletedRepair(String.format("After waiting for poll 
interval of %s seconds",
-                                                      
NodeProbe.JMX_NOTIFICATION_POLL_INTERVAL_SECONDS));
+                Thread.currentThread().setName("RepairRunner #" + cmd
+                                               + " ks=" + keyspace
+                                               + " tables=" + 
options.get(RepairOption.COLUMNFAMILIES_KEY));
 
 Review comment:
   Same comment as before. Thread name should stay constant. Use logging 
instead.

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


With regards,
Apache Git Services

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

Reply via email to