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


##########
src/java/org/apache/cassandra/tcm/log/LocalLog.java:
##########
@@ -707,15 +710,21 @@ private Async(LogSpec logSpec)
 
         @Override
         public ClusterMetadata awaitAtLeast(Epoch epoch) throws 
InterruptedException, TimeoutException
+        {
+            return awaitAtLeast(epoch, -1, null);
+        }
+
+        @Override
+        public ClusterMetadata awaitAtLeast(Epoch epoch, long timeout, 
TimeUnit unit) throws InterruptedException, TimeoutException
         {
             ClusterMetadata lastSeen = committed.get();
             return lastSeen.epoch.compareTo(epoch) >= 0
                    ? lastSeen
-                   : new AwaitCommit(epoch).get();
+                   : new AwaitCommit(epoch).get(timeout, unit);
         }
 
         @Override
-        public void runOnce(DurationSpec duration) throws TimeoutException
+        public void runOnce(long timeout, TimeUnit unit) throws 
TimeoutException

Review Comment:
   > This is the normal idiom for communicating a timeout in Java
   
   Java yes (though that was before `Duration`, and now `Duration` is becoming 
a norm), but not within this file.  Our style guide calls out avoiding making 
style changes that are not consistent with the rest of the file... we should be 
100% `DurationSpec` or `long, TimeUnit`, we shouldn't be mixing and matching.
   
   ```
   Method and Variable Naming Consistency
   
   Ensure consistency of naming within a method, and between methods. It may be 
that multiple names are appropriate for a concept, but these should not be 
mixed and matched within the project. If you modify a concept, or improve the 
naming of a concept, make all relevant - including existing - code consistent 
with the new terminology. If possible, correspond with a prior author before 
modifying their semantics.
   ```
   
   https://cassandra.apache.org/_/development/code_style.html



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