tjiuming opened a new pull request, #18859:
URL: https://github.com/apache/pulsar/pull/18859
### Motivation
When initialize PendingAckHandleImpl, it will call
```
pendingAckStoreProvider.checkInitializedBefore(persistentSubscription)
.thenAccept(init -> {
if (init) {
initPendingAckStore();
} else {
completeHandleFuture();
}
});
```
And `pendingAckStoreProvider.checkInitializedBefore(persistentSubscription)`
will call `MetadataStore#asyncExists(String ledgerName)`
If MetadataStore no available at that time, it may returns an exception.
If we don't handle the exception when call
```
pendingAckStoreProvider.checkInitializedBefore(persistentSubscription)
```
the PendingAckHandleImpl cannot completed.
[addConsumer](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java#L214)
will always block, the Consumer created in
[PersistentTopic](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java#L809)
will never close.
### Matching PR in forked repository
PR in forked repository: <!-- ENTER URL HERE -->
--
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]