michaeljmarshall commented on code in PR #19159:
URL: https://github.com/apache/pulsar/pull/19159#discussion_r1067185187
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -3663,7 +3663,7 @@ Pair<PositionImpl, Long> getFirstPositionAndCounter() {
public void activateCursor(ManagedCursor cursor) {
synchronized (activeCursors) {
- if (activeCursors.get(cursor.getName()) == null) {
+ if (!cursor.isActive()) {
Review Comment:
Just for reference, this change ultimately relies on a call to this method:
https://github.com/apache/pulsar/blob/3bb93cb95e6c5290f59d6b7b4a57ec8296691569/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L3695-L3697
We don't want to change the scope of the `synchronized` block, as far as I
can tell.
--
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]