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


##########
src/java/org/apache/cassandra/hints/HintsDispatcher.java:
##########
@@ -138,8 +196,11 @@ private Action sendHintsAndAwait(HintsReader.Page page)
          *
          * If that is not the case, we'll need to perform conversion to a 
newer (or an older) format, and decoding the hint
          * is an unavoidable intermediate step.
+         *
+         * If Accord is enabled or these hints are from the batchlog and were 
originally attempted on Accord then
+         * we also need to decode so we can route the Hint contents 
appropriately.
          */
-        Action action = reader.descriptor().messagingVersion() == 
messagingVersion
+        Action action = reader.descriptor().messagingVersion() == 
messagingVersion && !DatabaseDescriptor.getAccordTransactionsEnabled() && 
!hostId.equals(RETRY_ON_DIFFERENT_SYSTEM_UUID)

Review Comment:
   If you are migrating to Accord you won't be using hints for very long so I 
didn't think it was worth optimizing. There is also the issue of having to 
deliver hints from the batchlog that aren't for any specific host so we would 
need implementation and both sender and receiver to do the routing.
   
   I was happy to leave it as a wart, but yeah it's definitely possible to 
improve it further. I think responding back if hints can't be applied is 
probably the way to go so all the logic remains here and we can have the same 
logic for resending hints that need to be split and sending hints that are from 
the batchlog.



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