-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bundle split capabilities in ModularLoadManagerImpl #385
Conversation
@@ -289,28 +290,38 @@ public Boolean call() throws Exception { | |||
|
|||
// Broker doesn't restart on global-zk session lost: so handling unexpected exception | |||
try { | |||
this.zkSession.get().getData(path, watcher, (rc, path1, ctx, content, stat) -> { | |||
// Put watch on the node no matter what |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you describe this change a bit more? Since it doesn't affect only the bundle splitting in the load manager, it would be better to split it in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! This uses the capability of ZooKeeper.exists
to put a watch on nonexistent nodes. The absence of this behavior caused an issue in which namespace bundle boundary updates were not being seen across all brokers. I will make a separate PR w/ just the cache change.
should we close this PR in favor of #857 ? |
Yes closing for #857 |
…#385) Signed-off-by: Pavel Agaletskiy <psagaletskiy@avito.ru> Co-authored-by: Pavel Agaletskiy <psagaletskiy@avito.ru>
Motivation
ModularLoadManagerImpl
lacked bundle split capabilities. Additionally, automatic bundle splits reassigned the bundles to the same broker when the bundle could more usefully be reassigned after being split.Modifications
Roughly in order of importance:
ModularLoadManagerImpl
.ZooKeeperCache
will now always put a watch on a node, even if it did not previously exist. This is done via using the capability ofZooKeeper.exists
to put a watch on non-existent nodes.BundleSplitStrategy
has been added to allow the injection of automatic bundle splitting behavior.loadBalancerAutoBundleSplitEnabled
is now a dynamic configuration.BundleData
->TimeAverageBundleData
BundleData
holds non-time average (numBundles/Topics, etc) bundle valuesModularLoadManagerImpl
such asModularLoadManagerStrategy
are now exposed thePulsarService
instance instead ofServiceConfiguration
to give more information and freedom.Result
This PR adds a bundle split mechanism for
ModularLoadManagerImpl
and changes bundle splitting behavior so that bundles which are split are also unloaded, so that the splits may be assigned to new brokers.