-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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: fix thread synchronization issue #6245 #7800
Conversation
@ctron: This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions 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. |
Welcome @ctron! |
Hi @ctron. Thanks for your PR. I'm waiting for a kubernetes 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. Instructions 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. |
7a4f8fb
to
a18af2a
Compare
/ok-to-test I wanna just make sure that in scale situations we wouldn't get into a lock condition always trying to regenerate the nginx.conf file |
/retest |
a18af2a
to
f242ad0
Compare
f242ad0
to
f9f7b5f
Compare
Well, there is always a trade-off … somehow access needs to be synced. A dug a bit deeper to check out if there could be an alternative to simply locking the template writer. After checking the implementation of the writer, I noticed that my fix didn't actually fix. As the function returns a slice (which again is just a pointer) the content of that slice still might get modified, as there is a buffer pool in play. So I swapped out the lock for a copy of the buffer resulting buffer. Honestly, I am not sure why there is a buffer in there. I guess to work around Go's garbage collector. Now the implementation expects the interface implementation to return a buffer it no longer mutates. With the downside of making a copy of the buffer before returning it to the caller. Maybe a further improvement would be, if the |
/retest |
f9f7b5f
to
8d97901
Compare
@ctron let me check again :) |
/lgtm Seems like a clever solution, I would anyway keep an eye on it to see if it generates some sort of performance impact in a future. Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ctron, rikatz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* fix: fix thread synchronization issue #6245 (#7800) * Add option to sanitize annotation inputs (#7874) * Add option to sanitize annotation inputs * Fix e2e tests after string sanitization * Add proxy_pass and serviceaccount as denied values * Trim spaces from badword items (#7921) * Fix tests from cherrypick Co-authored-by: Jens Reimann <[email protected]>
What this PR does / why we need it:
fixes #6245
Types of changes
Which issue/s this PR fixes
fixes #6245
How Has This Been Tested?
Checklist: