crossoverJie commented on code in PR #20911:
URL: https://github.com/apache/pulsar/pull/20911#discussion_r1284579598
##########
pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarSplitManager.java:
##########
@@ -328,6 +328,9 @@ Collection<PulsarSplit> getSplitsForTopic(String
topicNamePersistenceEncoding,
splits.add(pulsarSplit);
}
return splits;
+ } catch (ManagedLedgerException exception){
Review Comment:
<img width="1431" alt="image"
src="https://github.com/apache/pulsar/assets/15684156/de02d14f-8331-40ce-962b-9d706575af5d">
If we do not catch exceptions, the client will directly get this exception,
but for the user, they do not need to know about this exception, I think we
only need to return an empty list.
As for whether to catch all `ManagedLedgerException`, do you have any
suggestions?
https://github.com/apache/pulsar/blob/2ab184e49a036a1dd10dc537bef4ab034a5ad5e0/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/AsyncCallbacks.java#L53
After all, the callback function declares `ManagedLedgerException` and
cannot know which specific `ManagedLedgerException` will be thrown.
--
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]