artemlivshits commented on code in PR #13787:
URL: https://github.com/apache/kafka/pull/13787#discussion_r1362733029


##########
core/src/main/scala/kafka/cluster/Partition.scala:
##########
@@ -1279,7 +1283,7 @@ class Partition(val topicPartition: TopicPartition,
   }
 
   def appendRecordsToLeader(records: MemoryRecords, origin: AppendOrigin, 
requiredAcks: Int,
-                            requestLocal: RequestLocal): LogAppendInfo = {
+                            requestLocal: RequestLocal, verificationGuard: 
Object = null): LogAppendInfo = {

Review Comment:
   Ok, maybe it was confusing to refer to object identity as its address, let 
me make a more precise statement: 2 independently allocated objects cannot 
reside at the same address at the same point in time, so `new Object != new 
Object` is true at any given point in time, no matter what GC does, and that's 
the property that's used in this change.
   
   I don't think there is an expectation that the string literals would be 
different objects, this code allocates new objects to get unique identity.



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