devinbost opened a new pull request #10758: URL: https://github.com/apache/pulsar/pull/10758
It looks like it's possible for `pendingAddEntries` to have an `OpAddEntry` instance that hasn't had a `ledgerId` set before `checkAddTimeout()` is called. We add the `OpAddEntry` to `pendingAddEntries` here: https://github.com/apache/pulsar/blob/a223cc214be7594e9b37bcbf0b078dc78b157b74/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L716 and set the `ledgerId` later on `OpAddEntry` in that method: https://github.com/apache/pulsar/blob/a223cc214be7594e9b37bcbf0b078dc78b157b74/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L760 If `checkAddTimeout()` is called before the `ledgerId` is set, the `ledgerId` will show as -1 (https://github.com/apache/pulsar/blob/a223cc214be7594e9b37bcbf0b078dc78b157b74/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L3678), and if that's still -1 when the handler reaches `ledgerClosed(..)`, we may not close the ledger that was timing out. -- 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. For queries about this service, please contact Infrastructure at: [email protected]
