lhotari commented on code in PR #17252:
URL: https://github.com/apache/pulsar/pull/17252#discussion_r953376245


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java:
##########
@@ -129,7 +129,7 @@ public class Consumer {
 
     private static final double avgPercent = 0.9;
     private boolean preciseDispatcherFlowControl;
-    private PositionImpl readPositionWhenJoining;
+    private volatile PositionImpl readPositionWhenJoining;

Review Comment:
   that's true. the design of PositionImpl is not optimal since it's not an 
immutable class. However, in this case, the instance that is used is an 
"effectively immutable" instance. 



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