[Bug] Failed to load topic within timeout for only one topic when set maxUnackedMessagesPerConsumer to 1 for shared subscriptions
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before reporting
- [x] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Read release policy
- [x] I understand that [unsupported versions](https://pulsar.apache.org/contribute/release-policy/#supported-versions) don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### User environment
Broker version: 3.0.11
Broker OS: 6.1.124 #1 SMP PREEMPT_DYNAMIC Sat Jan 25 00:17:27 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Broker java: OpenJDK 64-Bit Server VM Temurin-17.0.14+7 (build 17.0.14+7, mixed mode, sharing)
### Issue Description
- What happened
What did I do ?
I set maxUnackedMessagesPerConsumer to 1 then restarted brokers .
it got an error for one of the topics then i cannot send message to this topic
then i reverted the changes, it was back to normal again .
- What did I expect
No errors for all topics and i should be able to send messages to the topics
### Error messages
```text
error in broker
2025-05-07T17:10:43,725+0000 [metadata-store-11-1] INFO org.apache.bookkeeper.client.MetadataUpdateLoop - UpdateLoop(ledgerId=5397,loopId=3df7f546) conflict writing metadata to store, update local value and try again
----- and below errors in command line
bin/pulsar-admin topics stats persistent://0/Orchestration/AutomationExec-1017
--- An unexpected error occurred in the server ---
Message: Failed to load topic within timeout
Stacktrace:
org.apache.pulsar.common.util.FutureUtil$LowOverheadTimeoutException: Failed to load topic within timeout
at org.apache.pulsar.broker.service.BrokerService.futureWithDeadline(...)(Unknown Source)
Reason:
--- An unexpected error occurred in the server ---
Message: Failed to load topic within timeout
Stacktrace:
org.apache.pulsar.common.util.FutureUtil$LowOverheadTimeoutException: Failed to load topic within timeout
at org.apache.pulsar.broker.service.BrokerService.futureWithDeadline(...)(Unknown Source)
```
### Reproducing the issue
1. broker should be on 3.0.11
2. set maxUnackedMessagesPerConsumer to 1 and restart brokers
### Additional information
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Reproduce on Pulsar 3.0.11 with maxUnackedMessagesPerConsumer set to 1, then inspect BrokerService.futureWithDeadline and the broker error from bin/pulsar-admin topics stats. Compare behavior before and after reverting the setting; done means the affected topic loads without timing out and accepts messages after broker restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100