chia7712 commented on code in PR #20694:
URL: https://github.com/apache/kafka/pull/20694#discussion_r2426762825
##########
clients/src/main/java/org/apache/kafka/clients/producer/MockProducer.java:
##########
@@ -73,7 +74,7 @@ public class MockProducer<K, V> implements Producer<K, V> {
private boolean transactionAborted;
private boolean producerFenced;
private boolean sentOffsets;
- private long commitCount = 0L;
+ private final AtomicLong commitCount = new AtomicLong(0);
Review Comment:
This change does not guarantee that `MockProducer` is thread-safe
--
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]