[Bug] Failed to open ledger caused by org.apache.pulsar.broker.service.schema.exceptions.SchemaException: Error while recovering
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Version
OS: Linux
Pulsar: 2.9.3
### Minimal reproduce step
1. Create cluster with three nodes.
2. Create namesapce ns01.
3. Set persistence to 2:2:2.
4. Create topic topic01.
5. Start test client to send 10 messages, set schema to String.
6. Find schema ledger stored node in zk.
7. Stop a bookkeeper node.
8. Start test client again.
### What did you expect to see?
Test client send message successful.
### What did you see instead?
```
Received error from server: org.apache.pulsar.broker.service.schema.exceptions.SchemaException: Error while recovering ledger - ledger=42 - operation=Failed to open ledger caused by org.apache.pulsar.broker.service.schema.exceptions.SchemaException: Error while recovering ledger - ledger=42 - operation=Failed to open ledger
```
### Anything else?
_No response_
### Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
Contributor guide
Research direction
Reproduce the failure on Pulsar 2.9.3 using the three-node setup, persistence 2:2:2, a String schema, and a stopped BookKeeper node. Start by tracing schema-ledger recovery from the reported SchemaException and verify that the test client can send messages successfully after the node restarts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100