Topic metadata not removed for partitioned topics
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 142
Description
**Describe the bug**
Pulsar enables `brokerDeleteInactiveTopicsEnabled` by default. However, for partitioned topics, if a topic was de
**To Reproduce**
Steps to reproduce the behavior:
1. Modify the `conf/standalone.conf`
```properties
# How often to check for inactive topics
brokerDeleteInactiveTopicsFrequencySeconds=10
```
2. Start a standalone
```bash
bin/pulsar standalone
```
3. Create a partitioned topic
```bash
bin/pulsar-admin topics create-partitioned-topic my-topic -p 3
```
4. Produce a message, otherwise the topic won't be deleted (I'm not sure if this behavior is right)
```bash
./bin/pulsar-client produce -m hello my-topic
```
5. Wait for at least 10 seconds, then list the topics
```bash
$ ./bin/pulsar-admin topics list public/default
$ ./bin/pulsar-admin topics create-partitioned-topic my-topic -p 3
20:01:41.196 [AsyncHttpClient-7-1] WARN org.apache.pulsar.client.admin.internal.BaseResource - [http://localhost:8080/admin/v2/persistent/public/default/my-topic/partitions] Failed to perform http put request: javax.ws.rs.ClientErrorException: HTTP 409 Conflict
Partitioned topic already exists
Reason: Partitioned topic already exists
```
**Expected behavior**
After the partitioned topic is deleted, the metadata should be removed as well.
**Desktop (please complete the following information):**
- OS: MacOS
Contributor guide
Research direction
Reproduce the issue using conf/standalone.conf and the standalone broker, then run the listed pulsar-admin and pulsar-client commands for a partitioned topic. Trace the topic deletion and partition metadata handling from the relevant broker entry points. Done means inactive partitioned topics disappear from the topic list, their metadata is removed, and the topic can be created again without a conflict.
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
- 35/100