A few months ago, I spent 24 hours straight tracking down a production Apache Pulsar outage: producers kept writing to a topic, yet every consumer on that topic froze.
The deceptive bug: failed to read entries wasn't a storage failure
The broker logs pointed straight at storage ( EntryCacheImpl - failed to read entries ), which normally makes you suspect BookKeeper data corruption.
Reading the BookKeeper ledger directly proved the entries were intact. Comparing Pulsar 2.8.4 against 2.10.6 finally exposed the real culprit: a rare same-thread recursive reentrancy on the replay/redelivery path:
ManagedCursor replay -> ManagedLedger asyncReadEntry -> EntryCacheImpl cache hit (synchronous callback) -> PersistentDispatcherMultipleConsumers readEntriesComplete -> sendMessagesToConsumers -> readMoreEntries -> asyncReplayEntries -> ...…