aweisberg commented on code in PR #3395:
URL: https://github.com/apache/cassandra/pull/3395#discussion_r1707952463


##########
src/java/org/apache/cassandra/hints/HintsDispatcher.java:
##########
@@ -165,10 +226,62 @@ private Action sendHintsAndAwait(HintsReader.Page page)
         else
         {
             HintDiagnostics.pageSuccessResult(this, success, failures, 
timeouts);
+            rehintHintsNeedingRehinting();
             return Action.CONTINUE;
         }
     }
 
+    private void rehintHintsNeedingRehinting()
+    {
+        ClusterMetadata cm = ClusterMetadata.current();
+        Hint hint;
+        while ((hint = hintsNeedingRehinting.poll()) != null)
+        {
+            HintsService.instance.writeForAllReplicas(hint);
+            Mutation mutation = hint.mutation;
+            // Also may need to apply locally because it's possible this is 
from the batchlog
+            // and we never applied it locally
+            // TODO (review): Additional error handling necessary? Hints are 
lossy

Review Comment:
   Except they are how the batchlog does retries and we go to surprising 
lengths to preserve hints. I recall seeing that we stream hints to replacement 
nodes.



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