BewareMyPower commented on code in PR #25922:
URL: https://github.com/apache/pulsar/pull/25922#discussion_r3353081448
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -1184,7 +1184,8 @@ private CompletableFuture<Subscription>
getDurableSubscription(String subscripti
}
Map<String, Long> properties =
PersistentSubscription.getBaseCursorProperties(replicated);
- ledger.asyncOpenCursor(Codec.encode(subscriptionName),
initialPosition, properties, subscriptionProperties,
+ String encodedSubscriptionName = Codec.encode(subscriptionName);
+ ledger.asyncOpenCursor(encodedSubscriptionName, initialPosition,
properties, subscriptionProperties,
Review Comment:
The race should not exist because this method is synchronized. The only
concern is that the `getCursors()` method exposes `cursors` so that `cursors`
could be modified without synchronizing the whole managed ledger.
--
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]