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

separate PluginId module from config.rb #832

Merged
merged 1 commit into from
Mar 10, 2016
Merged

Conversation

tagomoris
Copy link
Member

  • simply speaking, it's wrong file to write it
  • added a feature to check whether id is intentionally set by user or not
    • it's important to check whether we can create many thing depends on id or not
    • for example, id-based auto generated buffer path, and plugin storage on local filesystem

@tagomoris tagomoris force-pushed the separate-plugin-id-class branch 2 times, most recently from ebefc84 to f7e8d6f Compare March 9, 2016 20:00

module Fluent
module PluginId
@@configured_ids = {}
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 stored values are not used.
Using Set or Array is better for memory usage and GC pressure.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, that's right. I'll use it.

* simply speaking, it's wrong file to write it
* added a feature to check whether id is intentionally set by user or not
  * it's important to check whether we can create many thing depends on id or not
  * for example, id-based auto generated buffer path, and plugin storage on local filesystem
@tagomoris
Copy link
Member Author

I modified commits:

  • to use Set instead of Hash
  • to stringify @id not to duplicate values between strings and numbers (or other types)
  • not to add nil if @id is missing

tagomoris added a commit that referenced this pull request Mar 10, 2016
separate PluginId module from config.rb
@tagomoris tagomoris merged commit cd770f5 into master Mar 10, 2016
@tagomoris
Copy link
Member Author

Merged.

@sonots
Copy link
Member

sonots commented Mar 10, 2016

LGTM

@tagomoris tagomoris deleted the separate-plugin-id-class branch May 17, 2016 07:29
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.

3 participants