nicktelford commented on code in PR #22597:
URL: https://github.com/apache/kafka/pull/22597#discussion_r3441095673


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStreamThread.java:
##########
@@ -301,6 +312,13 @@ public void run() {
                 }
                 stateConsumer.pollAndUpdate();
 
+                final long uncommittedLimit = maxUncommittedBytes;

Review Comment:
   I don't think so. The crucial thing here is that the following few lines use 
a consistent value, so we would still need to copy it out of the AtomicLong 
into a temporary variable. `maxUncommittedBytes` is already marked `volatile`, 
so updates to it from other threads should be immediately published to the 
`GlobalStreamThread` (same goes for `maxUncommittedBytesPerThread` in 
`StreamThread`).



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