pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[improve][broker]add NamespacePolicies and AntiAffinity check before unload in checkNamespaceBundleSplit

Open Nicklee007 opened this issue 2 years ago • 2 comments

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

  1. add NamespacePolicies and AntiAffinity check before unload bundle when checkNamespaceBundleSplit.
  2. add some unit test.

Documentation

  • [X] doc-not-needed

Nicklee007 avatar Jul 25 '22 13:07 Nicklee007

/pulsarbot run-failure-checks

Nicklee007 avatar Aug 30 '22 15:08 Nicklee007

The pr had no activity for 30 days, mark with Stale label.

github-actions[bot] avatar Oct 31 '22 02:10 github-actions[bot]

Codecov Report

Merging #16780 (1f56dc6) into master (99e26f5) will decrease coverage by 8.94%. The diff coverage is 68.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

Impacted file tree graph

@@             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

codecov-commenter avatar Dec 07 '22 09:12 codecov-commenter

/pulsarbot rerun-failure-checks

Nicklee007 avatar Dec 07 '22 12:12 Nicklee007

@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.

Nicklee007 avatar Dec 08 '22 02:12 Nicklee007

The pr had no activity for 30 days, mark with Stale label.

github-actions[bot] avatar Jan 08 '23 02:01 github-actions[bot]

/pulsarbot rerun-failure-checks

Nicklee007 avatar Jan 11 '23 02:01 Nicklee007

/pulsarbot rerun-failure-checks

Nicklee007 avatar Jan 11 '23 09:01 Nicklee007