You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "crossoverJie (via GitHub)" <gi...@apache.org> on 2023/08/01 13:42:20 UTC

[GitHub] [pulsar] crossoverJie commented on a diff in pull request #20911: [fix][sql] Fix SQL query is blocked

crossoverJie commented on code in PR #20911:
URL: https://github.com/apache/pulsar/pull/20911#discussion_r1280666779


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java:
##########
@@ -443,7 +443,8 @@ public void asyncOpenReadOnlyManagedLedger(String managedLedgerName,
 
         }).exceptionally(e -> {
             log.error("[{}] Failed to initialize Read-only managed ledger", managedLedgerName, e);
-            callback.openReadOnlyManagedLedgerFailed((ManagedLedgerException) e.getCause(), ctx);
+            callback.openReadOnlyManagedLedgerFailed(
+                    new ManagedLedgerException.ManagedLedgerNotFoundException(e.getMessage()), ctx);

Review Comment:
   It was my oversight, how about changing it to:
   ```java
   callback.openReadOnlyManagedLedgerFailed(
                       new ManagedLedgerException(e.getMessage()), ctx);
   ```



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