JNSimba commented on code in PR #123:
URL: 
https://github.com/apache/doris-flink-connector/pull/123#discussion_r1135029951


##########
flink-doris-connector/src/main/java/org/apache/doris/flink/backend/BackendClient.java:
##########
@@ -69,27 +69,23 @@ public BackendClient(Routing routing, DorisReadOptions 
readOptions) {
     private void open() {
         logger.debug("Open client to Doris BE '{}'.", routing);
         TException ex = null;
-        for (int attempt = 0; !isConnected && attempt < retries; ++attempt) {
+        for (int attempt = 0; attempt < retries; ++attempt) {
             logger.debug("Attempt {} to connect {}.", attempt, routing);
             TBinaryProtocol.Factory factory = new TBinaryProtocol.Factory();
             transport = new TSocket(routing.getHost(), routing.getPort(), 
socketTimeout, connectTimeout);
             TProtocol protocol = factory.getProtocol(transport);
             client = new TDorisExternalService.Client(protocol);
-            if (isConnected) {
-                logger.info("Success connect to {}.", routing);
-                return;
-            }
             try {
                 logger.trace("Connect status before open transport to {} is 
'{}'.", routing, isConnected);
                 if (!transport.isOpen()) {
                     transport.open();
                     isConnected = true;

Review Comment:
   maybe add log `logger.info("Success connect to {}.", routing);` in this be 
better?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to