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

Fix monitor agent compatibility #1232

Merged
merged 4 commits into from
Sep 20, 2016
Merged

Conversation

tagomoris
Copy link
Member

fix #1226.

* RootAgent now knows all output plugins including children of MultiOutput
  * So in_monitor_agent doesn't need to fetch children of MultiOutput plugins
* Fluent::Plugin::MultiOutput is now a root plugin class out of Fluent::Plugin::Output
@tagomoris tagomoris added bug Something isn't working v0.14 labels Sep 13, 2016
@tagomoris
Copy link
Member Author

@repeatedly Please review this too.

@@ -326,6 +326,7 @@ def start
@buffering = prefer_buffered_processing
if !@buffering && @buffer
@buffer.terminate # it's not started, so terminate will be enough
@buffer = nil
Copy link
Member

Choose a reason for hiding this comment

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

It seems error prune.
Using configured value is better for detecting output plugin is un-buffered or buffered.

Copy link
Member Author

Choose a reason for hiding this comment

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

Non-buffered output plugin (without #write method) doesn't have values on @buffer.
And, output plugin instances which runs this line is determined as non-buffered plugin. So the @buffer value is unassigned.
No bad/wrong things there are.

Copy link
Member

Choose a reason for hiding this comment

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

I see. If so, adding comment is better like "This line is needed for detecting buffer or non-buffer, e.g. used by in_monitor_agent".
Only this line, it looks like for GC.

And we should move this :buffer reader from for test to above attr_reader lines.

attr_reader :buffer, :retry, :secondary, :chunk_keys, :chunk_key_time, :chunk_key_tag

Copy link
Member Author

Choose a reason for hiding this comment

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

No. @buffering shows this plugin is buffered or non-buffered. Unassigning @buffer is just to avoid side-effect in in_monitor_agent.

Copy link
Member Author

@tagomoris tagomoris Sep 20, 2016

Choose a reason for hiding this comment

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

And @buffer is still only for tests (... and in_monitor_agent).

Copy link
Member

Choose a reason for hiding this comment

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

I understand the situation. Adding comment is better with "Avoid side-effect that in_monitor_agent shows non-buffered plugins as buffered."

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@repeatedly
Copy link
Member

LGTM

@tagomoris tagomoris merged commit 3b16861 into master Sep 20, 2016
@tagomoris tagomoris deleted the fix-monitor-agent-compatibility branch September 20, 2016 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v0.14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

monitor_agent does strange output in v0.14
2 participants