-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failed update partition of topic #11683
failed update partition of topic #11683
Conversation
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Outdated
Show resolved
Hide resolved
Thanks for your contribution. For this PR, do we need to update docs? (The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks) |
no need doc. |
58e6675
to
49c6cdd
Compare
49c6cdd
to
bc771fe
Compare
Please fix the code style.
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Outdated
Show resolved
Hide resolved
0fa1c93
to
8dc16b7
Compare
@eolivelli @lhotari PTAL |
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Outdated
Show resolved
Hide resolved
@codelipenghui PTAL |
Fixes #11682 ### Motivation 1、`tryCreatePartitionsAsync` would create znode under `managed-ledgers/public/default/persistent/` after success invoke 2、there are chance, `updatePartitionedTopic` would failed, and managed-ledgers znode would stay unclean. If We tried update partition once again , We would fail, because of managed-ledgers znode exists https://github.com/apache/pulsar/blob/80171a733ab4799f912a8935f03c19554b9ca3b1/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java#L473-L485 ### Modifications clean up managed-ledger znode after we failed update partition. (cherry picked from commit 90c7db4)
Fixes apache#11682 ### Motivation 1、`tryCreatePartitionsAsync` would create znode under `managed-ledgers/public/default/persistent/` after success invoke 2、there are chance, `updatePartitionedTopic` would failed, and managed-ledgers znode would stay unclean. If We tried update partition once again , We would fail, because of managed-ledgers znode exists https://github.com/apache/pulsar/blob/80171a733ab4799f912a8935f03c19554b9ca3b1/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java#L473-L485 ### Modifications clean up managed-ledger znode after we failed update partition. (cherry picked from commit 90c7db4) (cherry picked from commit f96f967)
Fixes apache#11682 ### Motivation 1、`tryCreatePartitionsAsync` would create znode under `managed-ledgers/public/default/persistent/` after success invoke 2、there are chance, `updatePartitionedTopic` would failed, and managed-ledgers znode would stay unclean. If We tried update partition once again , We would fail, because of managed-ledgers znode exists https://github.com/apache/pulsar/blob/80171a733ab4799f912a8935f03c19554b9ca3b1/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java#L473-L485 ### Modifications clean up managed-ledger znode after we failed update partition.
Fixes #11682
Motivation
1、
tryCreatePartitionsAsync
would create znode undermanaged-ledgers/public/default/persistent/
after success invoke2、there are chance,
updatePartitionedTopic
would failed, and managed-ledgers znode would stay unclean. If We tried update partition once again , We would fail, because of managed-ledgers znode existspulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Lines 473 to 485 in 80171a7
Modifications
clean up managed-ledger znode after we failed update partition.