jolshan commented on code in PR #14568:
URL: https://github.com/apache/kafka/pull/14568#discussion_r1362938647


##########
core/src/main/scala/kafka/log/UnifiedLog.scala:
##########
@@ -1080,9 +1080,9 @@ class UnifiedLog(@volatile var logStartOffset: Long,
     (updatedProducers, completedTxns.toList, None)
   }
 
-  private def batchMissingRequiredVerification(batch: MutableRecordBatch, 
requestVerificationGuard: Object): Boolean = {
+  private def batchMissingRequiredVerification(batch: MutableRecordBatch, 
requestVerificationGuard: VerificationGuard): Boolean = {
     
producerStateManager.producerStateManagerConfig().transactionVerificationEnabled()
 && !batch.isControlBatch &&
-      (requestVerificationGuard != verificationGuard(batch.producerId) || 
requestVerificationGuard == null)
+      (requestVerificationGuard == null || 
!requestVerificationGuard.equals(verificationGuard(batch.producerId)))

Review Comment:
   I recall part of the conversation referring to the likelihood of collisions. 
I see that the reference is also 64 bits. 
   
   I can change it back to reference, but since we have the autoincrementing 
value, I thought it could be useful for readability of the code since object 
references being used to check equality aren't as common of a pattern in Java.



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to