-
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 redirect loop when using ExtensibleLoadManager and list in bundle admin API #20528
[fix][broker] Fix redirect loop when using ExtensibleLoadManager and list in bundle admin API #20528
Conversation
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.
+1
@@ -1108,19 +1108,7 @@ public Set<NamespaceBundle> getOwnedServiceUnits() { | |||
} | |||
|
|||
public boolean isServiceUnitOwned(ServiceUnitId suName) throws Exception { |
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.
as a follow up work we should remove this synchronous method
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.
Yes, let's address it in another PR.
@@ -1108,19 +1108,7 @@ public Set<NamespaceBundle> getOwnedServiceUnits() { | |||
} | |||
|
|||
public boolean isServiceUnitOwned(ServiceUnitId suName) throws Exception { | |||
if (suName instanceof TopicName) { | |||
return isTopicOwnedAsync((TopicName) suName).get(); |
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.
Are we safe to skip these checks?
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.
Yes, you can see the isServiceUnitOwnedAsync
method has the same checks.
Codecov Report
@@ Coverage Diff @@
## master #20528 +/- ##
=============================================
+ Coverage 36.82% 72.92% +36.09%
- Complexity 12040 31905 +19865
=============================================
Files 1690 1867 +177
Lines 128968 138548 +9580
Branches 14036 15216 +1180
=============================================
+ Hits 47493 101034 +53541
+ Misses 75220 29490 -45730
- Partials 6255 8024 +1769
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…list in bundle admin API (#20528) PIP: #16691 When using `ExtensibleLoadManager` and list in bundle admin API, it will redirect forever because `isServiceUnitOwned` method is checking the `ownershipCache` as the ownership storage, however, when using `ExtensibleLoadManager`, it stored the ownership to table view. * Call `isServiceUnitOwnedAsync ` when using `isServiceUnitOwned `. * Add unit test to cover this case.
PIP: #16691
Motivation
When using
ExtensibleLoadManager
and list in bundle admin API,it will redirect forever because
isServiceUnitOwned
method is checking theownershipCache
as the ownership storage, however, when usingExtensibleLoadManager
, it stored the ownership to table view.Modifications
isServiceUnitOwnedAsync
when usingisServiceUnitOwned
.Documentation
doc
doc-required
doc-not-needed
doc-complete