Skip to content

Connection reload threadsafety + more efficient manticore pooling #281

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

Closed

Conversation

andrewvc
Copy link
Contributor

The goal here is to use a single manticore pool + a single ES ruby client + a single sniffer for future Logstashes.

The issue currently is that sniffing redefines the manticore connection pool. This patch makes the whole thing threadsafe and more efficiently use connections.

@andrewvc andrewvc force-pushed the connection_reload_theradsafety branch from 81cdc4c to f8a7655 Compare February 29, 2016 23:28
@andrewvc andrewvc changed the title WIP Connection reload threadsafety + more efficient manticore pooling Connection reload threadsafety + more efficient manticore pooling Mar 1, 2016
info.merge :host => host, :port => port, :id => id
end
end.compact
# We use a timeout in the client itself here because using a library like
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's put this comment into the commit message instead of the code?

@karmi
Copy link
Contributor

karmi commented Mar 1, 2016

I understand and like the motivation, but I think on the implementation layer we have to solve the problem with the timeout, as evident from the failing test and our Slack chat. If the base class needs additions, let's do them.

@andrewvc andrewvc force-pushed the connection_reload_theradsafety branch from f8a7655 to 8a1086c Compare March 1, 2016 19:33
@andrewvc
Copy link
Contributor Author

andrewvc commented Mar 2, 2016

@karmi as we discussed I removed the timeout issue. There is one failing test, but I don't test its legitimate, what do you think?

andrewvc added a commit to andrewvc/logstash-output-elasticsearch that referenced this pull request Mar 2, 2016
Fixes logstash-plugins#377
Before acceptance this will need elastic/elasticsearch-ruby#281
Merged in and used for the ruby client
andrewvc added a commit to andrewvc/logstash-output-elasticsearch that referenced this pull request Mar 2, 2016
Fixes logstash-plugins#377
Before acceptance this will need elastic/elasticsearch-ruby#281
Merged in and used for the ruby client
andrewvc added a commit to andrewvc/logstash-output-elasticsearch that referenced this pull request Mar 2, 2016
Fixes logstash-plugins#377
Before acceptance this will need elastic/elasticsearch-ruby#281
Merged in and used for the ruby client
karmi pushed a commit that referenced this pull request Mar 3, 2016
@karmi karmi closed this in 067842d Mar 3, 2016
@karmi
Copy link
Contributor

karmi commented Mar 3, 2016

I've split the commit into two separate ones (one for the threadsafety, one for the Manticore optimization), and merged into master. When you verify this does what is intended in Logstash, @andrewvc, we can do a release later in the day.

andrewvc added a commit to logstash-plugins/logstash-output-elasticsearch that referenced this pull request May 3, 2016
Fixes #377
Before acceptance this will need elastic/elasticsearch-ruby#281
Merged in and used for the ruby client

We no longer need the concurrent ruby gem

Support manticore pool options directly

Add sniffing to info log level

Proper info logging for sniffing

Exponential backoff for retries

Make this actually multithreaded by omitting request mutex

More fixes for threadsafety

Add healthcheck option

Checkpoint
andrewvc added a commit to andrewvc/logstash-output-elasticsearch that referenced this pull request May 20, 2016
Fixes logstash-plugins#377
Before acceptance this will need elastic/elasticsearch-ruby#281
Merged in and used for the ruby client

We no longer need the concurrent ruby gem

Support manticore pool options directly

Add sniffing to info log level

Proper info logging for sniffing

Exponential backoff for retries

Make this actually multithreaded by omitting request mutex

More fixes for threadsafety

Add healthcheck option

Checkpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants