You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "chia7712 (via GitHub)" <gi...@apache.org> on 2025/11/01 18:38:15 UTC
Re: [PR] KAFKA-12999: Make RecordHeader reads thread-safe [kafka]
chia7712 commented on code in PR #20751:
URL: https://github.com/apache/kafka/pull/20751#discussion_r2483837770
##########
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:
the collection is not thread-safe, right?
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org