zymap commented on a change in pull request #12123:
URL: https://github.com/apache/pulsar/pull/12123#discussion_r713600965
##########
File path:
tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreBackedReadHandleImpl.java
##########
@@ -105,6 +118,11 @@ public LedgerMetadata getLedgerMetadata() {
long nextExpectedId = firstEntry;
try {
while (entriesToRead > 0) {
+ State state = STATE_UPDATER.get(this);
+ if (state == State.Closed) {
+ log.warn("Reading a closed read handler. Ledger
ID: {}, Read range: {}-{}", ledgerId, firstEntry, lastEntry);
+ throw new
BKException.BKUnexpectedConditionException();
Review comment:
The `promise` is completed in the `catch` section.
--
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]