michaeljmarshall commented on code in PR #17252:
URL: https://github.com/apache/pulsar/pull/17252#discussion_r953364078
##########
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:
The `PositionImpl` class has two mutable `long` fields. Given that it is
only ever serialized to a `String`, we might avoid some edge cases by making
this object a `volatile String`.
--
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]