Log msg memory accounting fixes#889
Merged
sodomelle merged 9 commits intoaxoflow:mainfrom Jan 29, 2026
Merged
Conversation
cbd6bf4 to
ad64ac4
Compare
5b0328a to
eae92a8
Compare
eae92a8 to
432096f
Compare
sodomelle
reviewed
Jan 27, 2026
Contributor
sodomelle
left a comment
There was a problem hiding this comment.
I marked a few things for fix/clarification.
432096f to
ebc657a
Compare
Member
Author
|
@sodomelle I am following up light changes so the CI becomes green. I am also thinking about fixing the memory use for the "backlog", right now they are not part of the memory usage, but I think they should be. |
67fc2f8 to
d45b3c8
Compare
We are actually allocating a larger chunk of memory, not just as much as we actually use. Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Cover msg->tags and the socket addresses. Signed-off-by: Balazs Scheidler <[email protected]>
This patch removes the test the goes into implementation details about how we allocate the LogMessage. This is really fragile and does not add much value, it's best to remove it. Signed-off-by: Balazs Scheidler <[email protected]>
Also, make it inline. Signed-off-by: Balazs Scheidler <[email protected]>
… enough value These tests implicitly test the LogMessage memory allocation, which can be affected by the tests themselves, thus the memory allocation of a single LogMessage was not constant. With this value change, this can assumed to not change. Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Memory usage is not stable between reload/restart operations, so we can't really test them. The other testcases have these disabled already, so follow suit. Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
d45b3c8 to
b5a707c
Compare
Member
Author
|
@sodomelle I addressed the review comments, added a news file and made the CI green, so I think this should be good to go in, can you recheck this and add your approval? Thank you. |
sodomelle
approved these changes
Jan 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The calculation behind the
syslogng_memory_queue_memory_usage_byteswas incorrect in various ways:nodesarrayThis PR fixes both of these problems.