lhotari opened a new pull request #9763: URL: https://github.com/apache/pulsar/pull/9763
Fixes #9762 ### Motivation NPEs occurs in PersistentReplicator, see #9762 for details. ### Modifications - Make `cursor` field `volatile` since the field is updated asynchronously in another thread. - - Remove the unnecessary `synchronization` on `openCursorAsync` method since it's not needed. - Add null checks before accessing the `cursor` field since statistics might be updated before the cursor is available. Call comes from https://github.com/apache/pulsar/blob/cc64889abe94d47f048e2f8e8fb10d6c37e695ec/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarStats.java#L94-L133 ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
