[Bug] Didn't updata metadata when try to updata the num of partitions of a partitioned-topic
- 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
v-2.10.0
### Minimal reproduce step
1、We've got a partitioned-topic which had only one partition and it was behave normaly.
2、When I try to updata the num of partitions of that partitioned-topic from 1 to 30, if I don't use -f(means force to do that), got err msg like this

But when I use -f in the same command, it showed nothing in command line.

3、After I used the command(pulsar-admin topics update-partitioned-topic)to update num of partitions whih -f, seemed like it was succeed. And then I tried to use admin command(pulsar-admin topics list)to verify the rsult, accualy there was partition-0 to partition-29, seemed correct.

But when I used another command(pulsar-admin topics get-partitioned-topic-metadata)to get the true num of partitions from metadata, it was still 1……

And then I double check this result in zookeeper, the num of partitions was truely 1.

### What did you expect to see?
Succeed to update the num of partitions of the specific partitioned-topic, and updata to metadata correct.
### What did you see instead?
As above~
### Anything else?
I‘ve fix that problem in my pulsar clulster by delete the partitioned-topic and then recreate a partitioned-topic with the specific num of partitions which I want.
Looking forward to your guys reply~
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start by reproducing the update-partitioned-topic command with and without -f, then compare pulsar-admin topics list with get-partitioned-topic-metadata and the corresponding ZooKeeper value. Done means increasing a topic from one to 30 partitions updates the metadata consistently with the created partitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100