-
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 bug causing loss of migrated information when setting other localPolicies in namespace #23764
Conversation
…ng other localPolicies in namespace
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.
LGTM, good work @hrzzzz
/pulsarbot rerun-failure-checks |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #23764 +/- ##
============================================
+ Coverage 73.57% 74.26% +0.68%
+ Complexity 32624 32098 -526
============================================
Files 1877 1838 -39
Lines 139502 143058 +3556
Branches 15299 16232 +933
============================================
+ Hits 102638 106239 +3601
+ Misses 28908 28426 -482
- Partials 7956 8393 +437
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…ng other localPolicies in namespace (#23764) Co-authored-by: ruihongzhou <[email protected]> (cherry picked from commit bbe2cab)
…ng other localPolicies in namespace (#23764) Co-authored-by: ruihongzhou <[email protected]> (cherry picked from commit bbe2cab)
…ng other localPolicies in namespace (apache#23764) Co-authored-by: ruihongzhou <[email protected]>
Motivation
#21367 introduced the
migrated
field inlocalPolicies
to indicate whether the topics under a namespace have been migrated in the blue-green cluster migration feature.In #9598, it is specified that when updating the field content of
localPolicies
, a new object needs to be created instead of updating the original object.After the addition of the
migrated
field in #21367, there has been no synchronization of modifications in other places that updatelocalPolicies
. This could lead to the loss of themigrated
content during other operations onlocalPolicies
, such as setting thenamespaceAntiAffinityGroup
, etc.Modifications
migrated
content in the places wherelocalPolicies
are updatedmigrated
field oflocalPolicies
, do not modify the original objectVerifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: hrzzzz#13