Skip to content

Commit a0a154c

Browse files
committed
Fix the check for expected value of number of arenas for flight transport
Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
1 parent a036313 commit a0a154c

File tree

1 file changed

+4
-1
lines changed
  • plugins/arrow-flight-rpc/src/main/java/org/opensearch/arrow/flight/bootstrap

1 file changed

+4
-1
lines changed

plugins/arrow-flight-rpc/src/main/java/org/opensearch/arrow/flight/bootstrap/ServerConfig.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,10 @@ private static class Netty4Configs {
238238

239239
@SuppressForbidden(reason = "required for netty allocator configuration")
240240
public static void init(Settings settings) {
241-
checkSystemProperty("io.netty.allocator.numDirectArenas", "1");
241+
int numArenas = Integer.parseInt(System.getProperty("io.netty.allocator.numDirectArenas"));
242+
if (numArenas <= 0) {
243+
throw new IllegalStateException("io.netty.allocator.numDirectArenas must be > 0");
244+
}
242245
checkSystemProperty("io.netty.noUnsafe", "false");
243246
checkSystemProperty("io.netty.tryUnsafe", "true");
244247
checkSystemProperty("io.netty.tryReflectionSetAccessible", "true");

0 commit comments

Comments
 (0)