-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] Fix resource_quota_zpath #21461
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #21461 +/- ##
============================================
+ Coverage 73.14% 73.24% +0.09%
- Complexity 32570 32681 +111
============================================
Files 1890 1892 +2
Lines 140357 140707 +350
Branches 15425 15483 +58
============================================
+ Hits 102663 103054 +391
+ Misses 29595 29541 -54
- Partials 8099 8112 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
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:) |
Technoboy-
left a comment
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 |
BewareMyPower
left a comment
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_zpathinLoadSimulationControllerandModularLoadManagerImpl.As we can see from the
BundlesQuotas(line30) that theresource_quota_zpathshould 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
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
AnonHxy#47