Skip to content
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

fix NettyGRPC non linux #8062

Merged
merged 1 commit into from Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -253,7 +253,7 @@

/** Utility for setting up various shared configuration settings between both servers */
private NettyServerBuilder builderFor(final int port, NettyConfig config) {
NettyServerBuilder builder;
NettyServerBuilder builder = null;

Check warning on line 256 in hedera-node/hedera-app/src/main/java/com/hedera/node/app/grpc/impl/netty/NettyGrpcServerManager.java

View check run for this annotation

Codecov / codecov/patch

hedera-node/hedera-app/src/main/java/com/hedera/node/app/grpc/impl/netty/NettyGrpcServerManager.java#L256

Added line #L256 was not covered by tests
try {
builder = NettyServerBuilder.forPort(port)
.keepAliveTime(config.prodKeepAliveTime(), TimeUnit.SECONDS)
Expand All @@ -269,7 +269,7 @@
.bossEventLoopGroup(new EpollEventLoopGroup())
.workerEventLoopGroup(new EpollEventLoopGroup());
logger.info("Using Epoll for gRPC server");
} catch (final Exception ignored) {
} catch (final UnsatisfiedLinkError | NoClassDefFoundError ignored) {

Check warning on line 272 in hedera-node/hedera-app/src/main/java/com/hedera/node/app/grpc/impl/netty/NettyGrpcServerManager.java

View check run for this annotation

Codecov / codecov/patch

hedera-node/hedera-app/src/main/java/com/hedera/node/app/grpc/impl/netty/NettyGrpcServerManager.java#L272

Added line #L272 was not covered by tests
povolev15 marked this conversation as resolved.
Show resolved Hide resolved
// If we can't use Epoll, then just use NIO
logger.info("Epoll not available, using NIO");
builder = NettyServerBuilder.forPort(port)
Expand All @@ -282,8 +282,9 @@
.maxConcurrentCallsPerConnection(config.prodMaxConcurrentCalls())
.flowControlWindow(config.prodFlowControlWindow())
.directExecutor();
} catch (final Exception unexpected) {
logger.info("Unexpected exception initializing Netty", unexpected);

Check warning on line 286 in hedera-node/hedera-app/src/main/java/com/hedera/node/app/grpc/impl/netty/NettyGrpcServerManager.java

View check run for this annotation

Codecov / codecov/patch

hedera-node/hedera-app/src/main/java/com/hedera/node/app/grpc/impl/netty/NettyGrpcServerManager.java#L285-L286

Added lines #L285 - L286 were not covered by tests
}

return builder;
}

Expand Down