-
Notifications
You must be signed in to change notification settings - Fork 490
correlation: make grouping-by and group-lines clone ids unique among instances sharing a common ancestor #4478
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
Conversation
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.
Please also fix group-lines()
. Thanks!
I'm starting to feel like an incremental |
I've changed the implementation to a clone_id that is incremented only among instances with a common ancestor. Perhaps that could work? |
4bcffe6
to
8702c4e
Compare
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 like this solution :)
However while reviewing your previous one I realized that maybe incremental clone-ids will never solve our issue. I think the user can modify the config so that the new clone happens in the middle of the cloning chain. E.g.:
Let's say the config produces the following clone-id pairing:
A: 1, B: 2, C: 3
The user adds another reference of this parser (D), but it is placed in such a place in the config, where it get's cloned after B. We get the following ids:
A: 1, B: 2, D: 3, C: 4.
Or the user deletes the parser from B and C, and inserts it to D. We get the following ids:
A: 1, D: 2.
This means the clone-id is still dependent on other uses of the parser in the config.
If it is possible we should find a unique identifier of where the cloning happens, so we don't run into this problem. Not sure what it should be or if it is even possible. We should investigate what information is available from the context, where the cloning happens.
If we cannot find such info, I think your implementation is better than the one on master, so we could merge it, but it is still not complete, unfortunately.
Thanks! I think a fully non-incremental solution could be difficult to implement. We cannot rely on the filter's order of occurance or line number in the config, therefore its ID should then be based on a semantic understanding of the config itself. One shortcut would be to store (or hash) the configuration above the group-by() call, but then irrelevant changes in other sections would also invalidate the persist state. A full solution would be to understand and store (or hash) the group-by() call's relevant context in the config file, such as the log path it is declared in, or any other possible context. In my opinion that would be a larger project that might best be handled in a separate enhancement issue. |
Build FAILURE |
c3a2edc
to
062b2a5
Compare
d0589d2
to
f993e58
Compare
…g a common ancestor See here: syslog-ng#4443 Signed-off-by: Alex Becker <alex.becker@quest.com>
…iew feedback Signed-off-by: Alex Becker <beckeralex@protonmail.com>
Thanks! :) |
Resolves #4443