@Override
        public CompletableFuture<ClickHouseResponse> execute(ClickHouseRequest<?> request) {
            final ClickHouseRequest<?> sealedRequest = request.seal();
            final ClickHouseNode server = sealedRequest.getServer();
            final ClickHouseProtocol protocol = server.getProtocol();
            final ClickHouseClient currentClient = client.get();
            if (!currentClient.accept(protocol)) {
                ClickHouseClient newClient = null;
                try {
                    newClient = ClickHouseClient.builder().agent(false)
                            .config(new ClickHouseConfig(currentClient.getConfig(), server.config))
                            .nodeSelector(ClickHouseNodeSelector.of(protocol)).build();
                } catch (IllegalStateException e) {
                    // let it fail on execution phase
                    log.debug("Failed to find client for %s", server);
                } finally {
                    if (newClient != null) {
                        boolean changed = changeClient(currentClient, newClient);
                        log.debug("Switching client from %s to %s: %s", currentClient, newClient, changed);
                        if (changed) {
                            sealedRequest.resetCache();
                        }
                    }
                }
            }
            return sealedRequest.getConfig().isAsync()
                    ? getClient().execute(sealedRequest)
                            .handle((r, t) -> t == null ? r
                                    : handle(sealedRequest, t.getCause() != null ? t.getCause() : t))
                    : CompletableFuture.completedFuture(send(sealedRequest));
        }
Repeats sending same request until success, timed out or running into a
different error.

@param sealedRequest non-null sealed request
@param exception     non-null exception to start with
@param timeout       timeout in milliseconds, zero or negative numbers means
                     no repeat
@return non-null response
@throws CompletionException when error occurred or timed out
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseClientBuilder.java