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


##########
src/java/org/apache/cassandra/tcm/ClusterMetadataService.java:
##########
@@ -844,11 +844,22 @@ private Pair<State, Processor> delegateInternal()
         @Override
         public Commit.Result commit(Entry.Id entryId, Transformation 
transform, Epoch lastKnown, Retry.Deadline retryPolicy)
         {
-            Pair<State, Processor> delegate = delegateInternal();
-            Commit.Result result = delegate.right.commit(entryId, transform, 
lastKnown, retryPolicy);
-            if (delegate.left == LOCAL || delegate.left == RESET)
-                replicator.send(result, null);
-            return result;
+            while (!retryPolicy.reachedMax())

Review Comment:
   I believe im reverting this as Marcus is pushing a fix in his own JIRA



##########
src/java/org/apache/cassandra/tcm/ClusterMetadataService.java:
##########
@@ -844,11 +844,22 @@ private Pair<State, Processor> delegateInternal()
         @Override
         public Commit.Result commit(Entry.Id entryId, Transformation 
transform, Epoch lastKnown, Retry.Deadline retryPolicy)
         {
-            Pair<State, Processor> delegate = delegateInternal();
-            Commit.Result result = delegate.right.commit(entryId, transform, 
lastKnown, retryPolicy);
-            if (delegate.left == LOCAL || delegate.left == RESET)
-                replicator.send(result, null);
-            return result;
+            while (!retryPolicy.reachedMax())
+            {
+                try
+                {
+                    Pair<State, Processor> delegate = delegateInternal();
+                    Commit.Result result = delegate.right.commit(entryId, 
transform, lastKnown, retryPolicy);
+                    if (delegate.left == LOCAL || delegate.left == RESET)
+                        replicator.send(result, null);
+                    return result;
+                }
+                catch (NotCMSException e)
+                {
+                    retryPolicy.maybeSleep();
+                }
+            }
+            return Commit.Result.failed(ExceptionCode.SERVER_ERROR, "Could not 
commit " + transform.kind() + " at epoch " + lastKnown);

Review Comment:
   I believe im reverting this as Marcus is pushing a fix in his own JIRA



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