-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][broker] PIP-192 PIP-220 Added TransferShedder #18865
Conversation
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
Outdated
Show resolved
Hide resolved
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.
LGTM. Only have one comment, the configuration name is so long, can we remove the prefix?
...src/main/java/org/apache/pulsar/broker/loadbalance/extensions/scheduler/TransferShedder.java
Outdated
Show resolved
Hide resolved
44eb837
to
7bfb998
Compare
Please hold on reviewing this PR. I will refactor this PR according to the changes in #19154. |
Please continue the review. I applied the changes from #19154. |
+ "such as load balance states and decisions. " | ||
+ "(only used in load balancer extension logics)" | ||
) | ||
private boolean loadBalancerDebugModeEnabled = false; |
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.
Does this config is necessary? Maybe we can do the same thing via modifying the broker log config file.
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.
Some systems do support fine-grained debugging logs for certain features.
I am curious if the pulsar follows this practice, but I think this could be useful to see debug logs from load balancer logic only.
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.
Should we mark this configuration as dynamic? Then we can change this configuration in real time.
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.
I think we can mark all these configs as dynamic. Updating.
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.
The Pulsar broker uses the log4j2, which supports custom log configurations by modifying the config file ${PULSAR_HOME}/conf/log4j2.yaml
, which supports log control at the class level.
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.
That's another way of fine-configuring the log level, and I assume we can control the log level by the package as well.
But with this dynamic config, we can more easily turn on/off the debugging logs too.
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.
OK, but it's a little strange to add a separate param to control debug log information.
Master Issue: #18215
Motivation
This PR implement PIP-220, #18215
Modifications
For the PIP-220(a sub-pip of pip-192, #16691), this PR implements the TransferShedder and its unit test.
Also, there are minor changes in the related classes:
recentlyUnloadedBrokers
input var in NamespaceUnloadStrategy.findBundlesForUnloading(...)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
doc
doc-required
doc-not-needed
doc-complete
We will have separate PRs to update the Doc later.
Matching PR in forked repository
PR in forked repository: heesung-sn#16