poorbarcode commented on code in PR #22221:
URL: https://github.com/apache/pulsar/pull/22221#discussion_r1523754758


##########
pulsar-common/src/main/java/org/apache/pulsar/common/mutable/AtomicMutableBoolean.java:
##########


Review Comment:
   When an OpAddEntry is completed, it will always call 
`atomicBoolean.isTrue()` at [this 
line](https://github.com/apache/pulsar/pull/22221/files#diff-2c2fdb8cfc9daa4cd03ad15da3c7c7faeddee5ff3c102a56c8f33016bda82754R213).
 The value of Java's AtomicBoolean is modifier by `volatile`, it will reduce 
the performance. We can use a `MutableBoolean` to avoid using a `volatile` 
value when disabling the feature `setAddEntryTimeoutSeconds`.  see the method 
`createTimeoutTriggeredMarker `



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