Skip to content

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

Merged
gaozhangmin merged 1 commit into
apache:masterfrom
Nicklee007:add-namespace-polices-and-anti-affinity-check-in-checkNamespaceBundleSplit
Jan 11, 2023
Merged

[improve][broker]add NamespacePolicies and AntiAffinity check before unload in checkNamespaceBundleSplit#16780
gaozhangmin merged 1 commit into
apache:masterfrom
Nicklee007:add-namespace-polices-and-anti-affinity-check-in-checkNamespaceBundleSplit

Conversation

@Nicklee007

@Nicklee007 Nicklee007 commented Jul 25, 2022

Copy link
Copy Markdown
Contributor

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

  • doc-not-needed

Matching PR in forked repository

PR in forked repository:Nicklee007#2

@Nicklee007
Nicklee007 force-pushed the add-namespace-polices-and-anti-affinity-check-in-checkNamespaceBundleSplit branch 3 times, most recently from 5d6daa7 to 5c7e481 Compare August 30, 2022 02:33
@Nicklee007

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@Nicklee007
Nicklee007 force-pushed the add-namespace-polices-and-anti-affinity-check-in-checkNamespaceBundleSplit branch from 5c7e481 to be77de2 Compare September 5, 2022 08:24
@Nicklee007
Nicklee007 force-pushed the add-namespace-polices-and-anti-affinity-check-in-checkNamespaceBundleSplit branch from be77de2 to d098466 Compare September 21, 2022 09:14
@Nicklee007
Nicklee007 force-pushed the add-namespace-polices-and-anti-affinity-check-in-checkNamespaceBundleSplit branch from d098466 to 8859c06 Compare September 30, 2022 07:28
@github-actions

Copy link
Copy Markdown

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

@github-actions github-actions Bot added the Stale label Oct 31, 2022
@codelipenghui codelipenghui added this to the 2.12.0 milestone Oct 31, 2022
@Nicklee007
Nicklee007 force-pushed the add-namespace-polices-and-anti-affinity-check-in-checkNamespaceBundleSplit branch from 8859c06 to 8c17ec2 Compare December 7, 2022 09:35
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Dec 7, 2022
@Nicklee007
Nicklee007 force-pushed the add-namespace-polices-and-anti-affinity-check-in-checkNamespaceBundleSplit branch from 1f56dc6 to 8c17ec2 Compare December 7, 2022 09:46
@codecov-commenter

codecov-commenter commented Dec 7, 2022

Copy link
Copy Markdown

Codecov Report

Merging #16780 (1f56dc6) into master (99e26f5) will decrease coverage by 8.94%.
The diff coverage is 68.25%.

❗ 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%) ⬇️

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%) ⬇️
...he/pulsar/client/impl/MultiTopicsConsumerImpl.java 22.86% <0.00%> (-0.12%) ⬇️
...roker/loadbalance/impl/ModularLoadManagerImpl.java 59.63% <11.11%> (-0.10%) ⬇️
...ar/broker/loadbalance/impl/BundleSplitterTask.java 60.00% <50.00%> (+2.22%) ⬆️
...oker/service/schema/SchemaRegistryServiceImpl.java 52.31% <74.57%> (-5.65%) ⬇️
...broker/service/schema/BookkeeperSchemaStorage.java 75.07% <80.00%> (+2.06%) ⬆️
...ava/org/apache/pulsar/broker/admin/v1/Brokers.java 0.00% <0.00%> (-100.00%) ⬇️
...va/org/apache/pulsar/broker/admin/v1/Clusters.java 0.00% <0.00%> (-100.00%) ⬇️
.../org/apache/pulsar/broker/admin/v1/Properties.java 0.00% <0.00%> (-100.00%) ⬇️
...sar/broker/stats/metrics/ManagedLedgerMetrics.java 0.00% <0.00%> (-100.00%) ⬇️
... and 259 more

@Nicklee007

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@github-actions github-actions Bot removed the Stale label Dec 8, 2022
@Nicklee007

Copy link
Copy Markdown
Contributor Author

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

@github-actions

github-actions Bot commented Jan 8, 2023

Copy link
Copy Markdown

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

@github-actions github-actions Bot added the Stale label Jan 8, 2023
@Nicklee007
Nicklee007 force-pushed the add-namespace-polices-and-anti-affinity-check-in-checkNamespaceBundleSplit branch from 8c17ec2 to 7a6a1f8 Compare January 10, 2023 06:20
@Nicklee007

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@Nicklee007

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@gaozhangmin
gaozhangmin merged commit 0feaa45 into apache:master Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs ready-to-test Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants