diff --git a/CHANGELOG.md b/CHANGELOG.md index 6134eb8f..97825e99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 3.10.1 + - Properly naming netty threads [#191](https://github.com/logstash-plugins/logstash-input-http/pull/191) + ## 3.10.0 - add improved proactive rate-limiting, rejecting new requests when queue has been actively blocking for more than 10 seconds [#179](https://github.com/logstash-plugins/logstash-input-http/pull/179) diff --git a/VERSION b/VERSION index 30291cba..f870be23 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.10.0 +3.10.1 diff --git a/lib/logstash/inputs/http.rb b/lib/logstash/inputs/http.rb index ef64507d..4a9f1cb6 100644 --- a/lib/logstash/inputs/http.rb +++ b/lib/logstash/inputs/http.rb @@ -391,7 +391,8 @@ def normalize_ssl_client_authentication_value!(verify_mode, ssl_verify_mode) def create_http_server(message_handler) org.logstash.plugins.inputs.http.NettyHttpServer.new( - @host, @port, message_handler, build_ssl_params, @threads, @max_pending_requests, @max_content_length, @response_code) + @id, @host, @port, message_handler, build_ssl_params, @threads, + @max_pending_requests, @max_content_length, @response_code) end def build_ssl_params diff --git a/src/main/java/org/logstash/plugins/inputs/http/NettyHttpServer.java b/src/main/java/org/logstash/plugins/inputs/http/NettyHttpServer.java index f578cef6..c7498ff2 100644 --- a/src/main/java/org/logstash/plugins/inputs/http/NettyHttpServer.java +++ b/src/main/java/org/logstash/plugins/inputs/http/NettyHttpServer.java @@ -31,9 +31,9 @@ public class NettyHttpServer implements Runnable, Closeable { private final ThreadPoolExecutor executorGroup; private final HttpResponseStatus responseStatus; - public NettyHttpServer(String host, int port, IMessageHandler messageHandler, - SslHandlerProvider sslHandlerProvider, int threads, - int maxPendingRequests, int maxContentLength, int responseCode) + public NettyHttpServer(final String id, final String host, final int port, final IMessageHandler messageHandler, + final SslHandlerProvider sslHandlerProvider, final int threads, + final int maxPendingRequests, final int maxContentLength, final int responseCode) { this.host = host; this.port = port; @@ -42,12 +42,12 @@ public NettyHttpServer(String host, int port, IMessageHandler messageHandler, // boss group is responsible for accepting incoming connections and sending to worker loop // process group is channel handler, see the https://github.com/netty/netty/discussions/13305 // see the https://github.com/netty/netty/discussions/11808#discussioncomment-1610918 for why separation is good - bossGroup = new NioEventLoopGroup(1, daemonThreadFactory("http-input-connector")); - processorGroup = new NioEventLoopGroup(threads, daemonThreadFactory("http-input-processor")); + bossGroup = new NioEventLoopGroup(1, daemonThreadFactory(id + "-bossGroup")); + processorGroup = new NioEventLoopGroup(threads, daemonThreadFactory(id + "-processorGroup")); // event handler group executorGroup = new ThreadPoolExecutor(threads, threads, 0, TimeUnit.MILLISECONDS, - new ArrayBlockingQueue<>(maxPendingRequests), daemonThreadFactory("http-input-handler-executor"), + new ArrayBlockingQueue<>(maxPendingRequests), daemonThreadFactory(id + "-executorGroup"), new CustomRejectedExecutionHandler()); final HttpInitializer httpInitializer = new HttpInitializer(messageHandler, executorGroup,