[fix][broker] Fix resource_quota_zpath - #21461
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:
|
|
@HQebupt @congbobo184 @Technoboy- @codelipenghui PTAL. thanks:) |
Technoboy-
left a comment
There was a problem hiding this comment.
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.
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? |
|
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.
This test sets the default bundle resource quota by Pulsar Admin V1 API, could you also add a case for Pulsar Admin V2 API?
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