Skip to content

Commit

Permalink
JAMES-3715 AbstractConfigurableAsyncServer: Remove no longer used max…
Browse files Browse the repository at this point in the history
…ExecutorThreads

Computation are now conducted on the child threads of the Netty4 Server bootstraps.

On Netty 3 those computations were conducted on a thread pool yet separated
from the Netty 'workers' which could be seen as unnecessary context switches -
Netty worker threads were merely decoding and encoding the traffic.
  • Loading branch information
chibenwa committed Feb 27, 2022
1 parent d5cf674 commit 124c8cb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,7 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception

try {
try {
if (cp.get(NettyConstants.EXECUTION_HANDLER) != null) {
cp.addBefore(NettyConstants.EXECUTION_HANDLER, NettyConstants.HEARTBEAT_HANDLER, heartbeatHandler);
} else {
cp.addBefore(NettyConstants.CORE_HANDLER, NettyConstants.HEARTBEAT_HANDLER, heartbeatHandler);
}
cp.addBefore(NettyConstants.CORE_HANDLER, NettyConstants.HEARTBEAT_HANDLER, heartbeatHandler);
} catch (IllegalArgumentException e) {
LOGGER.info("heartbeat handler is already part of this pipeline", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public interface NettyConstants {
String CONNECTION_LIMIT_PER_IP_HANDLER = "connectionPerIpLimitHandler";
String CONNECTION_COUNT_HANDLER = "connectionCountHandler";
String CHUNK_WRITE_HANDLER = "chunkWriteHandler";
String EXECUTION_HANDLER = "executionHandler";
String HEARTBEAT_HANDLER = "heartbeatHandler";

AttributeKey<ImapSession> IMAP_SESSION_ATTRIBUTE_KEY = AttributeKey.valueOf("ImapSession");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ public abstract class AbstractConfigurableAsyncServer extends AbstractAsyncServe
/** The name of the parameter defining the service hello name. */
public static final String HELLO_NAME = "helloName";

public static final int DEFAULT_MAX_EXECUTOR_COUNT = 16;

private FileSystem fileSystem;

private boolean enabled;
Expand Down Expand Up @@ -118,8 +116,6 @@ public abstract class AbstractConfigurableAsyncServer extends AbstractAsyncServe

private ChannelHandlerFactory frameHandlerFactory;

private int maxExecutorThreads;

private MBeanServer mbeanServer;

private int port;
Expand Down Expand Up @@ -189,8 +185,6 @@ public final void configure(HierarchicalConfiguration<ImmutableNode> config) thr
int ioWorker = config.getInt("ioWorkerCount", DEFAULT_IO_WORKER_COUNT);
setIoWorkerCount(ioWorker);

maxExecutorThreads = config.getInt("maxExecutorCount", DEFAULT_MAX_EXECUTOR_COUNT);


configureHelloName(config);

Expand Down

0 comments on commit 124c8cb

Please sign in to comment.