[Bug] Replicated Subscriptions can be created on non-replicated topics
- 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.
### Read release policy
- [x] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### Version
OS- Rhel 9
Pulsar Version - 3.3.1
JDK Version - 17
### Minimal reproduce step
1. Create a tenant and namespace with allowed clusters A and B.
2. Create a topic without enabling geo replication on namespace or topic level.
3. Connect a consumer on the topic with a replicated subscription on Cluster A.
### What did you expect to see?
An error, as a replicated subscription should not be possible on a non-replicated topic.
### What did you see instead?
No error, with the subscription created and working. If I use Pulsar-admin to get the replication status on Cluster A, the result is **True**.
If I switch to pulsar admin on Cluster B, the subscription doesn't exist.
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start by reproducing the steps with a tenant, namespace, non-replicated topic, and replicated subscription on Cluster A. Inspect the subscription-creation path and the Pulsar-admin replication status on both clusters. Done means creation returns an error and no subscription exists on either cluster for a non-replicated topic.
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
- Mostly clear
- Newbie friendliness
- 45/100