-
Notifications
You must be signed in to change notification settings - Fork 1.1k
remove redundant update for performance #4248
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
remove redundant update for performance #4248
Conversation
|
Hi @lx1036. Thanks for your PR. I'm waiting for a fluid-cloudnative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/assign @cheyang |
remove redundant update to avoid upper replicas update must has conflict error, although it's in retry.RetryOnConflict() Signed-off-by: LiuXiang <lx1036@126.com>
ea97037 to
0467c04
Compare
|
|
First of all, there are indeed redundant update calls here, but they do not lead to conflicts. This is due to the implementation logic for the client in the controller-runtime, which has also been validated through logs of apiserver. The logic ensures that the updated objects will overwrite the original object with update response in memory. This PR makes the code logic more elegant. @cheyang Please take a look and merge it if there's no further comments |
TrafalgarZZZ
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.
I think this is really a great code optimization! Thanks @lx1036
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: TrafalgarZZZ The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



remove redundant update to avoid upper replicas update must has conflict error, although it's in retry.RetryOnConflict()
Ⅰ. Describe what this PR does
remove redundant statefulset update to avoid upper replicas update must has conflict error, although it's in retry.RetryOnConflict(), result to it have to update twice unneedly.
Ⅱ. Does this pull request fix one issue?
NONE
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews