YongGoose commented on code in PR #7170: URL: https://github.com/apache/incubator-seata/pull/7170#discussion_r1961037072
########## core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java: ########## @@ -346,11 +345,13 @@ public static String getSocketAddressStartChar() { /** * Gets client selector thread size. + * If the configured thread size is less than or equal to 0, it returns the default value. * - * @return the client selector thread size + * @return the client selector thread size, or the default value if the configured size is invalid. */ public int getClientSelectorThreadSize() { - return CONFIG.getInt(ConfigurationKeys.CLIENT_SELECTOR_THREAD_SIZE, DEFAULT_SELECTOR_THREAD_SIZE); + int threadSize = CONFIG.getInt(ConfigurationKeys.CLIENT_SELECTOR_THREAD_SIZE, WorkThreadMode.Default.getValue()); + return threadSize > 0 ? threadSize : WorkThreadMode.Default.getValue(); Review Comment: @funky-eyes Handling this in `NettyClientBootstrap` is a good idea, but I believe it is more appropriate to process it here. Because if we handle this in `NettyClientBootstrap`, we would need to process` -1` in every piece of code that retrieves the thread count using this value. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org