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

out_forward: Fix a race condition on handshake #3405

Merged
merged 1 commit into from
Jun 2, 2021

Commits on Jun 2, 2021

  1. out_forward: Fix a race condition on handshake

    Fix the following failed test it's caused by using a same unpacker from
    multiple threads:
    
    https://github.com/fluent/fluentd/runs/2725344894
    
    ```
    2021-06-02T06:50:53.7067710Z Failure: test: Node with security is thread-safe on multi threads(ForwardOutputTest):
    2021-06-02T06:50:53.7069440Z   '2021-06-02 06:50:53 +0000 [warn]: connection refused to test: invalid format for PONG message' happens.
    2021-06-02T06:50:53.7070450Z   <false> expected but was
    2021-06-02T06:50:53.7071110Z   <true>
    2021-06-02T06:50:53.7072550Z /Users/runner/work/fluentd/fluentd/test/plugin/test_out_forward.rb:1017:in `block in <class:ForwardOutputTest>'
    2021-06-02T06:50:53.7074360Z      1014:     end
    2021-06-02T06:50:53.7075180Z      1015:
    2021-06-02T06:50:53.7075860Z      1016:     logs = d.logs
    2021-06-02T06:50:53.7078420Z   => 1017:     assert_false(logs.any? { |log| log.include?("invalid format for PONG message") || log.include?("shared key mismatch") }, "'#{logs.last.strip}' happens")
    2021-06-02T06:50:53.7079580Z      1018:   end
    2021-06-02T06:50:53.7080160Z      1019:
    2021-06-02T06:50:53.7081050Z      1020:   def create_target_input_driver(response_stub: nil, disconnect: false, conf: target_config)
    ```
    
    Signed-off-by: Takuro Ashie <ashie@clear-code.com>
    ashie committed Jun 2, 2021
    Configuration menu
    Copy the full SHA
    9f9a67d View commit details
    Browse the repository at this point in the history