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

in_http: Fix "ignored parser options" problem on bulk insertion #2055

Merged
merged 1 commit into from
Jul 11, 2018

Commits on Jul 5, 2018

  1. in_http: Fix "ignored parser options" problem on bulk insertion

    What used to happen is that options in the <parser> section get ignored
    when we send events as a JSON array. This occurs because parser plugins
    are designed to handle a single hash value and do not generallly handle
    an array input well.
    
    Until now, we have tried to solve this issue by emulating the semantics
    of parser plugins in Fluent::Plugin::HttpInput (see 1afbfb1, 39f3a0d
    and f560017). However, this approach turned out to be error prone and
    rather tedious.
    
    This patch takes a different approach:
    
     - Whenever @parser is available, reuse @parser.convert_values() by
       manually applying it to each record in an input array.
     - Otherwise, fall back to the current logic.
    
    ... and should solve this class of issues.
    
    Signed-off-by: Fujimoto Seiji <fujimoto@clear-code.com>
    Fujimoto Seiji committed Jul 5, 2018
    Configuration menu
    Copy the full SHA
    2e5f963 View commit details
    Browse the repository at this point in the history