-
Notifications
You must be signed in to change notification settings - Fork 184
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
facade/ignition#302: Fix memory leaks caused by log and query recorder #344
Conversation
On first sight, this seems ok to me. @AlexVanderbist can you review and merge this? |
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.
Some minor changes request, but a great PR, look forward to merge it!
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.
Apart from the minor remarks by my colleagues; LGTM!
- Add optional log recorder limit to prevent memory leaks. Especially noticable during long running tasks or daemons. - Rewrote query recorder to not tigthly couple it with the framework container when deciding whether to include bindings or limit the maximum query count that is recorded. - Added a config flag to disable log recording all together. - Made sure that query and log recorders are not used when their enable flag is disabled.
Thanks, looks great! |
This change is causing a memory leak for me. |
Thanks for the feedback. Please let me know the details. For my use case the memory leak that I had previously was fixed once the array is topping out at the configured limit. |
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.
That's it.
The QueryRecorder uses a new config which didn't exist in my config cache (forgot to recreate it).
Because QueryRecorder was activated but the maximum_number_of_collected_logs didn't exist in my config cache yet, it was null which deactivated the "maximum logs" of 200 (by default).
So it was my fault for not recreating the config cache. Still I think the name of the config variable is wrong there.
#344: Fix wrong config usage
facade/ignition#344: Fix wrong config usage
facade/ignition#344: Fix wrong config usage
noticeable during long running tasks or daemons.
container when deciding whether to include bindings or limit the
maximum query count that is recorded.
flag is disabled.
Closes #302
Closes #301