-
Notifications
You must be signed in to change notification settings - Fork 214
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
klogr: optimize trimDuplicates #286
Comments
/assign |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The updated implementation no longer de-duplicates keys that get passed in the same call (WithValues, InfoS, etc.). logcheck should get extended to detect such duplicate keys: klog/hack/tools/logcheck/pkg/logcheck.go Lines 325 to 326 in 7a827a0
|
Resolved by PR #324 /close |
@pohly: Closing this issue. In response to this:
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. |
/kind feature
Describe the solution you'd like
This function looks very complex and probably does a lot of memory allocations in its append calls:
klog/klogr/klogr.go
Lines 73 to 116 in e7e4115
It removes duplicates also from the parameters of a call, something that the static logcheck utility can warn about. Therefore a simpler implementation which only removes obsolete entries from a prior WithValues should be sufficient.
Code was optimized in PR #324. Left todo: static code analysis.
The text was updated successfully, but these errors were encountered: