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


##########
src/java/org/apache/cassandra/tcm/RemoteProcessor.java:
##########
@@ -148,6 +148,30 @@ public ClusterMetadata fetchLogAndWait(Epoch waitFor, 
Retry.Deadline retryPolicy
         }
     }
 
+    @Override
+    public LogState reconstruct(Epoch lowEpoch, Epoch highEpoch, 
Retry.Deadline retryPolicy)
+    {
+        try
+        {
+            Promise<LogState> request = new AsyncPromise<>();
+            List<InetAddressAndPort> candidates = new 
ArrayList<>(log.metadata().fullCMSMembers());
+            sendWithCallbackAsync(request,
+                                  Verb.TCM_RECONSTRUCT_EPOCH_REQ,
+                                  new ReconstructLogState(lowEpoch, highEpoch),
+                                  new CandidateIterator(candidates),
+                                  new 
Retry.Backoff(TCMMetrics.instance.fetchLogRetries));
+            return request.get(retryPolicy.remainingNanos(), 
TimeUnit.NANOSECONDS);

Review Comment:
   From Accord usage, this was a single-shot feature. I am a bit concerned 
about storing the state in the local table because it'll require a pretty 
thorough set of tests, since technically _any_ of the epochs can be a snapshot, 
and we can not / should not leave any gaps. Does not mean we can not do this of 
course.



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