From 9cf3b4671db02f68cd984278c36a49cfe74f537b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 18:15:10 +0800 Subject: [PATCH] branch-2.1: [fix](broker) fix fd always timeout #48494 (#48522) Cherry-picked from #48494 Co-authored-by: Lijia Liu Co-authored-by: liutang123 Co-authored-by: Dongyang Li --- .../apache/doris/broker/hdfs/ClientContextManager.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/ClientContextManager.java b/fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/ClientContextManager.java index 2df4c12a7f..8e2fcfe60d 100644 --- a/fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/ClientContextManager.java +++ b/fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/ClientContextManager.java @@ -145,11 +145,11 @@ public class ClientContextManager { fd = entry.getKey(); if (entry.getValue().checkExpire(inputStreamExpireSeconds)) { ClientContextManager.this.removeInputStream(fd); + iter.remove(); + logger.info(fd + " in client [" + clientContext.clientId + + "] is expired, remove it from contexts. last update time is " + + entry.getValue().getLastPingTimestamp()); } - iter.remove(); - logger.info(fd + " in client [" + clientContext.clientId - + "] is expired, remove it from contexts. last update time is " - + entry.getValue().getLastPingTimestamp()); } } } @@ -167,7 +167,7 @@ public class ClientContextManager { ClientContextManager.this.removeOutputStream(fd); } clientContexts.remove(clientContext.clientId); - logger.info("client [" + clientContext.clientId + logger.info("client [" + clientContext.clientId + "] is expired, remove it from contexts. last access time is " + clientContext.lastAccessTimestamp); }