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

Client creation is not threadsafe #121

Open
robbavey opened this issue Apr 30, 2021 · 0 comments
Open

Client creation is not threadsafe #121

robbavey opened this issue Apr 30, 2021 · 0 comments

Comments

@robbavey
Copy link
Contributor

The construction of the Manticore Http Client is not threadsafe - the client is not constructed until first used in the multi_receive method, where it makes a call to the client method in the http client mixin.

With some debug logging adding, we can see:

[2021-04-30T17:20:38,734][[main]>worker0][INFO ][logstash.outputs.http    ][main][http_out] created #<Manticore::Client:0x4eb5309d>
[2021-04-30T17:20:38,734][[main]>worker3][INFO ][logstash.outputs.http    ][main][http_out] created #<Manticore::Client:0x165a8c91>
[2021-04-30T17:20:38,735][[main]>worker1][INFO ][logstash.outputs.http    ][main][http_out] created #<Manticore::Client:0x2d81234c>
[2021-04-30T17:20:38,735][[main]>worker2][INFO ][logstash.outputs.http    ][main][http_out] created #<Manticore::Client:0x3258927d>
[2021-04-30T17:20:40,853][[main]>worker1][INFO ][logstash.outputs.http    ][main][http_out] Used #<Manticore::Client:0x3258927d> to send request
[2021-04-30T17:20:40,853][[main]>worker3][INFO ][logstash.outputs.http    ][main][http_out] Used #<Manticore::Client:0x3258927d> to send request
[2021-04-30T17:20:40,854][[main]>worker2][INFO ][logstash.outputs.http    ][main][http_out] Used #<Manticore::Client:0x3258927d> to send request
[2021-04-30T17:20:40,854][[main]>worker0][INFO ][logstash.outputs.http    ][main][http_out] Used #<Manticore::Client:0x3258927d> to send request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant