pulsar
pulsar copied to clipboard
[improve][broker]add NamespacePolicies and AntiAffinity check before unload in checkNamespaceBundleSplit
Motivation
Add NamespacePolicies
and AntiAffinity
check before unload bundle when checkNamespaceBundleSplit
.
When unload the bundle after split, It's better to guarantee there are at least one another broker can load those bundle which satisfy the NamespacePolicies and AntiAffinity. Otherwise the bundle may not load successfully and cause the client reconnect frequently.
Modifications
- add NamespacePolicies and AntiAffinity check before unload bundle when
checkNamespaceBundleSplit
. - add some unit test.
Documentation
- [X]
doc-not-needed
/pulsarbot run-failure-checks
The pr had no activity for 30 days, mark with Stale label.
Codecov Report
Merging #16780 (1f56dc6) into master (99e26f5) will decrease coverage by
8.94%
. The diff coverage is68.25%
.
:exclamation: Current head 1f56dc6 differs from pull request most recent head 8c17ec2. Consider uploading reports for the commit 8c17ec2 to get more accurate results
@@ Coverage Diff @@
## master #16780 +/- ##
============================================
- Coverage 44.79% 35.84% -8.95%
+ Complexity 10026 6745 -3281
============================================
Files 703 623 -80
Lines 68808 59072 -9736
Branches 7375 6147 -1228
============================================
- Hits 30822 21174 -9648
- Misses 34378 35102 +724
+ Partials 3608 2796 -812
Flag | Coverage Δ | |
---|---|---|
unittests | 35.84% <68.25%> (-8.95%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
...pulsar/broker/admin/impl/PersistentTopicsBase.java | 13.56% <ø> (-45.10%) |
:arrow_down: |
...he/pulsar/client/impl/MultiTopicsConsumerImpl.java | 22.86% <0.00%> (-0.12%) |
:arrow_down: |
...roker/loadbalance/impl/ModularLoadManagerImpl.java | 59.63% <11.11%> (-0.10%) |
:arrow_down: |
...ar/broker/loadbalance/impl/BundleSplitterTask.java | 60.00% <50.00%> (+2.22%) |
:arrow_up: |
...oker/service/schema/SchemaRegistryServiceImpl.java | 52.31% <74.57%> (-5.65%) |
:arrow_down: |
...broker/service/schema/BookkeeperSchemaStorage.java | 75.07% <80.00%> (+2.06%) |
:arrow_up: |
...ava/org/apache/pulsar/broker/admin/v1/Brokers.java | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
...va/org/apache/pulsar/broker/admin/v1/Clusters.java | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
.../org/apache/pulsar/broker/admin/v1/Properties.java | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
...sar/broker/stats/metrics/ManagedLedgerMetrics.java | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
... and 259 more |
/pulsarbot rerun-failure-checks
@codelipenghui @Technoboy- Could you help review this PR , better to check if has another broker satisfy
NamespacePolicies
and AntiAffinity
for the bundle before unload bundle, which can help us avoid invalid bundle unload.
The pr had no activity for 30 days, mark with Stale label.
/pulsarbot rerun-failure-checks
/pulsarbot rerun-failure-checks