apache / pulsar

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org/
Apache License 2.0
14.26k stars 3.59k forks source link

[improve][broker] Support cleanup `replication cluster` and `allowed cluster` when cluster metadata teardown #23561

Closed Demogorgon314 closed 1 week ago

Demogorgon314 commented 2 weeks ago

Motivation

When executing the delete-cluster-metadata command, it should remove the current cluster from the replication cluster and allowed cluster, otherwise the cluster will still replicate the data to a deleted cluster.

Modifications

Support cleanup replication cluster and allowed cluster when cluster metadata teardown

Documentation

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 74.33%. Comparing base (bbc6224) to head (9519f69). Report is 717 commits behind head on master.

Files with missing lines Patch % Lines
...g/apache/pulsar/PulsarClusterMetadataTeardown.java 92.00% 1 Missing and 1 partial :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/apache/pulsar/pull/23561/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/pulsar/pull/23561?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #23561 +/- ## ============================================ + Coverage 73.57% 74.33% +0.75% - Complexity 32624 34427 +1803 ============================================ Files 1877 1943 +66 Lines 139502 147083 +7581 Branches 15299 16214 +915 ============================================ + Hits 102638 109331 +6693 - Misses 28908 29315 +407 - Partials 7956 8437 +481 ``` | [Flag](https://app.codecov.io/gh/apache/pulsar/pull/23561/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [inttests](https://app.codecov.io/gh/apache/pulsar/pull/23561/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `27.57% <92.00%> (+2.99%)` | :arrow_up: | | [systests](https://app.codecov.io/gh/apache/pulsar/pull/23561/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `24.36% <0.00%> (+0.04%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/apache/pulsar/pull/23561/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.72% <84.00%> (+0.87%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/apache/pulsar/pull/23561?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [...g/apache/pulsar/PulsarClusterMetadataTeardown.java](https://app.codecov.io/gh/apache/pulsar/pull/23561?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2FPulsarClusterMetadataTeardown.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL1B1bHNhckNsdXN0ZXJNZXRhZGF0YVRlYXJkb3duLmphdmE=) | `77.51% <92.00%> (+1.76%)` | :arrow_up: | ... and [660 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/23561/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)