diff --git a/cineast-core/src/main/java/org/vitrivr/cineast/core/db/cottontaildb/CottontailWrapper.java b/cineast-core/src/main/java/org/vitrivr/cineast/core/db/cottontaildb/CottontailWrapper.java index 2c638a117..c946ae295 100644 --- a/cineast-core/src/main/java/org/vitrivr/cineast/core/db/cottontaildb/CottontailWrapper.java +++ b/cineast-core/src/main/java/org/vitrivr/cineast/core/db/cottontaildb/CottontailWrapper.java @@ -32,7 +32,9 @@ public CottontailWrapper(String host, int port) { this.client = new SimpleClient(sharedChannel(host, port)); boolean pingSuccessful = this.client.ping(); watch.stop(); - if (!pingSuccessful) { + if (pingSuccessful) { + LOGGER.info("Connected to Cottontail DB in {} ms at {}:{}", watch.getTime(TimeUnit.MILLISECONDS), host, port); + } else { LOGGER.warn("Could not ping Cottontail DB instance at {}:{}", host, port); } } @@ -72,7 +74,6 @@ private static ManagedChannel sharedChannel(String host, int port) { * @return {@link ManagedChannel} */ private static ManagedChannel createChannel(String host, int port) { - final StopWatch watch = StopWatch.createStarted(); LOGGER.debug("Starting to connect to Cottontail DB at {}:{}", host, port); final NettyChannelBuilder builder = NettyChannelBuilder.forAddress(host, port).usePlaintext(); final ManagedChannel channel = builder.build(); @@ -80,8 +81,6 @@ private static ManagedChannel createChannel(String host, int port) { LOGGER.info("Closing connection to Cottontail DB."); channel.shutdownNow(); })); - watch.stop(); - LOGGER.info("Connected to Cottontail DB in {} ms at {}:{}", watch.getTime(TimeUnit.MILLISECONDS), host, port); return channel; }