Skip to content

Commit

Permalink
Make the SSL build context as util
Browse files Browse the repository at this point in the history
  • Loading branch information
anandkrshaw committed Sep 14, 2024
1 parent 22d0f23 commit 4915032
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
import io.grpc.Server;
import io.grpc.ServerBuilder;
import io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder;
import io.grpc.netty.shaded.io.netty.handler.ssl.SslContext;
import io.grpc.stub.StreamObserver;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -57,10 +55,6 @@ public class QueryServer extends PinotQueryWorkerGrpc.PinotQueryWorkerImplBase {
// TODO: Inbound messages can get quite large because we send the entire stage metadata map in each call.
// See https://github.com/apache/pinot/issues/10331
private static final int MAX_INBOUND_MESSAGE_SIZE = 64 * 1024 * 1024;
// the key is the hashCode of the TlsConfig, the value is the SslContext
// We don't use TlsConfig as the map key because the TlsConfig is mutable, which means the hashCode can change. If the
// hashCode changes and the map is resized, the SslContext of the old hashCode will be lost.
private static final Map<Integer, SslContext> SERVER_SSL_CONTEXTS_CACHE = new ConcurrentHashMap<>();

private final int _port;
private final QueryRunner _queryRunner;
Expand Down

0 comments on commit 4915032

Please sign in to comment.