Repository navigation
[improve][broker] PIP-192 Excluded bundles with isolation policy or anti-affinity-group policy from topk load bundles - #19742
Conversation
|
@heesung-sn Please add the following content to your PR description and select a checkbox: |
2f091fc to
48d9723
Compare
gaoran10
left a comment
There was a problem hiding this comment.
If we enable this config loadBalancerSheddingBundlesWithPoliciesEnabled , maybe we need to exclude brokers by isolation policies while transferring bundles.
This config targets bundles that configure isolation or anti-affinity policies. This PR filters out such bundles in the TransferShedder as well. (This PR needs to apply the IsolationPolicy support logic from this PR #19592, when merged.) |
Got it, thanks. |
57f5bb7 to
17f6bcd
Compare
|
@Demogorgon314 @gaoran10 @Technoboy- |
| pulsar.getNamespaceService().getNamespaceBundleFactory().getBundle(namespace, bundleRange); | ||
|
|
||
| if (!canTransferWithIsolationPoliciesToBroker( | ||
| if (!isLoadBalancerSheddingBundlesWithPoliciesEnabled |
There was a problem hiding this comment.
I'm a little confused. When getting TopKBundles if isLoadBalancerSheddingBundlesWithPoliciesEnabled is false and the bundle has an affinity(anti) policy, the bundle will be discarded, maybe we only need to check whether the bundle matches the policy or not.
I'm not sure if this table is correct.
| IsLoadBalancerSheddingBundlesWithPoliciesEnabled | HasPolicy | MatchPolicy | Auto-Unload |
|---|---|---|---|
| false | true | true | false |
| false | true | false | false |
| false | false | -- | true |
| true | true | true | true |
| true | true | false | false |
| true | false | -- | true |
There was a problem hiding this comment.
The above table is correct. Thank you for this catch. Updated the code.
17f6bcd to
e6adf65
Compare
…nti-affinity-group policy from topk load bundles
e6adf65 to
5a937ae
Compare
|
@Demogorgon314 plz merge this pr if looking good. |
Master Issue: #16691
Motivation
Raising a PR to implement #16691.
Bundles with isolation policies or anti-affinity-group policies are not ideal targets to auto-unload as destination brokers are limited.
Modifications
This PR
loadBalancerSheddingBundlesWithPoliciesEnabledto control this behavior.Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeWe will have separate PRs to update the Doc later.
Matching PR in forked repository
PR in forked repository: heesung-sohn#38