Automatically update broker resource on broker changes#8249
Merged
Jackie-Jiang merged 1 commit intoapache:masterfrom Feb 28, 2022
Merged
Automatically update broker resource on broker changes#8249Jackie-Jiang merged 1 commit intoapache:masterfrom
Jackie-Jiang merged 1 commit intoapache:masterfrom
Conversation
43fa240 to
914b8ea
Compare
Codecov Report
@@ Coverage Diff @@
## master #8249 +/- ##
============================================
+ Coverage 70.74% 70.77% +0.02%
Complexity 4238 4238
============================================
Files 1629 1629
Lines 85213 85364 +151
Branches 12830 12857 +27
============================================
+ Hits 60287 60419 +132
- Misses 20767 20774 +7
- Partials 4159 4171 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
xiangfu0
approved these changes
Feb 26, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix #7578
Currently, when a new broker joins the cluster, or the tags for a broker is changed, broker resource won't be updated automatically. Users need to either rebuild broker resource for each table in that broker tenant, or wait for the periodic task to fix the broker resource. Before that, the changes for the broker won't be reflected.
This PR makes the following enhancements:
updateBrokerResourceto create/update instance rest APIs to automatically update the broker resource when enabled (disabled by default to keep the current behavior because updating broker resource can be costly for large cluster)DefaultTenant, automatically update the broker resource so that it can build the routing tables properly.Release Notes
Add an optional boolean query parameter
updateBrokerResourceto the following rest APIs:POST /instances: Add an instancePUT /instances/{instanceName}: Update an instancePUT /instances/{instanceName}/updateTags: Update the tags for an instanceAdd a rest API to update the broker resource for a specified broker:
POST /instances/{instanceName}/updateBrokerResourceFor single-tenant cluster, when broker joins the cluster for the first time as
DefaultTenant, automatically update the broker resource so that it can build the routing tables properly