-
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
[fix][broker] Fix resource_quota_zpath #21461
Conversation
Codecov Report
@@ Coverage Diff @@
## master #21461 +/- ##
============================================
+ Coverage 73.14% 73.30% +0.15%
- Complexity 32570 32675 +105
============================================
Files 1890 1892 +2
Lines 140357 140632 +275
Branches 15425 15467 +42
============================================
+ Hits 102663 103088 +425
+ Misses 29595 29455 -140
+ Partials 8099 8089 -10
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This will lead to incompatibility between versions. |
Hi @liudezhi2098 . This patch will not lead incompatible issue I think:
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/cache/BundlesQuotas.java Lines 61 to 65 in bc84721
Lines 384 to 387 in bc84721
|
@HQebupt @congbobo184 @Technoboy- @codelipenghui PTAL. thanks:) |
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.
We'd better make BundlesQuotas#DEFAULT_RESOURCE_QUOTA_PATH to public, and remove them from ModularLoadManagerImpl/LoadSimulationController
@Technoboy- Good idea. PIP-301 #21129 is going to refactor this and will make it public. I think we could just correct the zpath here and make it to public in another PR when implements PIP-301 |
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.
Is there any test that could cover it?
@AnonHxy Could you please help add a test to cover this fix? And from the description, I still don't know what is the impact here. Is it something that doesn't work? how to reproduce it? |
...r-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java
Show resolved
Hide resolved
Hi @codelipenghui @poorbarcode @BewareMyPower Is there any other comments:) |
public void testBundleDataDefaultValue() throws Exception { | ||
final String tenant = "test"; | ||
final String cluster = "test"; | ||
String namespace = tenant + "/" + cluster + "/" + "test"; |
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.
This test sets the default bundle resource quota by Pulsar Admin V1 API, could you also add a case for Pulsar Admin V2 API?
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.
Done @poorbarcode
Motivation
Fix the
resource_quota_zpath
inLoadSimulationController
andModularLoadManagerImpl
.As we can see from the
BundlesQuotas
(line30) that theresource_quota_zpath
should be/loadbalance/resource-quota
, not/loadbalance/resource-quota/namespace
. so here we fix it.pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/cache/BundlesQuotas.java
Lines 30 to 32 in e55de39
Modifications
Fix resource_quota_zpath
Verifying this change
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
AnonHxy#47