ifesdjeen commented on code in PR #3842:
URL: https://github.com/apache/cassandra/pull/3842#discussion_r1936196300


##########
src/java/org/apache/cassandra/service/accord/FetchMinEpoch.java:
##########
@@ -145,21 +108,22 @@ public static Future<Long> fetch(SharedContext context, 
Map<InetAddressAndPort,
     }
 
     @VisibleForTesting
-    static Future<Long> fetch(SharedContext context, InetAddressAndPort to, 
Set<TokenRange> value)
+    static Future<Long> fetch(SharedContext context, InetAddressAndPort to)
     {
-        FetchMinEpoch req = new FetchMinEpoch(value);
-        return context.messaging().<FetchMinEpoch, 
FetchMinEpoch.Response>sendWithRetries(Backoff.NO_OP.INSTANCE,
-                                                                               
           MessageDelivery.ImmediateRetryScheduler.instance,
-                                                                               
           Verb.ACCORD_FETCH_MIN_EPOCH_REQ, req,
+        Backoff backoff = Backoff.fromConfig(context, 
DatabaseDescriptor.getAccord().minEpochSyncRetry);
+        return context.messaging().<FetchMinEpoch, 
FetchMinEpoch.Response>sendWithRetries(backoff,
+                                                                               
           context.optionalTasks()::schedule,
+                                                                               
           Verb.ACCORD_FETCH_MIN_EPOCH_REQ,
+                                                                               
           FetchMinEpoch.instance,
                                                                                
           Iterators.cycle(to),
-                                                                               
           
RetryPredicate.times(DatabaseDescriptor.getAccord().minEpochSyncRetry.maxAttempts.value),
+                                                                               
           RetryPredicate.ALWAYS_RETRY,

Review Comment:
   iirc this is faithful to the original implementation, which I believe might 
have been not entirely correct. We're collecting responses from all nodes, but 
we consider only successes here, which might mean we will not discover an early 
enough epoch. 
   
   We planned to address this when implementing epoch GC, where we'll indicate 
which epoch is retired, and a better success criteria for this.



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to