Skip to content
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

groupingby: add missing "discarded" counter #1748

Merged
merged 2 commits into from
Nov 8, 2017

Conversation

bazsi
Copy link
Collaborator

@bazsi bazsi commented Nov 5, 2017

This patch adds log_parser_init_method() to the init() call chain,
where it was missing. This fixes #1738, as well as any potential
missing initialization problem in the future.

Signed-off-by: Balazs Scheidler balazs.scheidler@balabit.com

@kira-syslogng
Copy link
Contributor

Build SUCCESS, the tests were executed on test branch: master and test suite: functions

@@ -387,6 +387,9 @@ grouping_by_init(LogPipe *s)
GroupingBy *self = (GroupingBy *) s;
GlobalConfig *cfg = log_pipe_get_config(s);

if (!log_parser_init_method(s))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not grouping-by parser call StatefulParser's init method instead?

@bazsi
Copy link
Collaborator Author

bazsi commented Nov 6, 2017 via email

This function is to pair up with log_parser_init_method(), right now
it is empty but can be used to tear down state that log_parser_init_method()
sets up.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
@bazsi bazsi force-pushed the grouping-by-missing-discarded-counter branch from f24f438 to 2ddd812 Compare November 7, 2017 16:05
@bazsi
Copy link
Collaborator Author

bazsi commented Nov 7, 2017

due to @gaborznagy's comment I have now added a broader refactor.

  1. log_parser_deinit_method() is introduced, so there's something to call from stateful_parser_deinit()
  2. this was added to all LogParser instances
  3. stateful_parser_init/deinit is added
  4. both db-parser and grouping-by are using the same init/deinit calls.

@kira-syslogng
Copy link
Contributor

Build FAILURE, $TEST_DESC_COMMENT

This patch adds log_parser_init_method() to the init() call chain,
where it was missing. This fixes #1738, as well as any potential
missing initialization problem in the future.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
@bazsi bazsi force-pushed the grouping-by-missing-discarded-counter branch from 2ddd812 to 232b8c4 Compare November 7, 2017 16:10
@kira-syslogng
Copy link
Contributor

Build SUCCESS, the tests were executed on test branch: master and test suite: functions

@pzoleex
Copy link
Collaborator

pzoleex commented Nov 8, 2017

@kira-syslogng test this please test branch=pzolee-grouping-by-parser;

@kira-syslogng
Copy link
Contributor

Build SUCCESS, the tests were executed on test branch: pzolee-grouping-by-parser and test suite: functions

@lbudai lbudai merged commit a57f458 into master Nov 8, 2017
@MrAnno MrAnno deleted the grouping-by-missing-discarded-counter branch April 15, 2018 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

grouping-by-parser: missing discarded stats counter
5 participants