mingyen066 commented on code in PR #20751:
URL: https://github.com/apache/kafka/pull/20751#discussion_r2484182862


##########
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecord.java:
##########
@@ -40,9 +40,8 @@
  * </ul>
  *
  * <p>
- * In particular, the {@link #headers()} method returns a mutable collection 
of headers. If multiple
- * threads access or modify these headers concurrently, it may lead to race 
conditions or inconsistent
- * states. It is the responsibility of the user to ensure that multi-threaded 
access is properly synchronized.
+ * However, the {@link #headers()} collection and individual header instances 
are

Review Comment:
   Thanks for catching this error. I’ve clarified that this refers to each 
header (not headers) in the ConsumerRecord’s Headers collection.



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

Reply via email to