You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/17 04:28:37 UTC

[GitHub] [pulsar] congbobo184 commented on a change in pull request #14286: [Transaction] Fix enable transaction don't use wait read op.

congbobo184 commented on a change in pull request #14286:
URL: https://github.com/apache/pulsar/pull/14286#discussion_r828744430



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
##########
@@ -848,11 +944,14 @@ public boolean cancelPendingReadRequest() {
         if (log.isDebugEnabled()) {
             log.debug("[{}] [{}] Cancel pending read request", ledger.getName(), name);
         }
-        return WAITING_READ_OP_UPDATER.getAndSet(this, null) != null;
+        // cancel all read op
+        return WAITING_READ_OP_UPDATER.getAndSet(this, null) != null
+                | WAITING_READ_OP_UPDATER_BY_MAX_READ_POSITION.getAndSet(this, null) != null;

Review comment:
       should use "|", we should cancle all wait read op not use "||"




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org