From c375f99c0a1c8e2f0838553ca58d3e554cdcd4b5 Mon Sep 17 00:00:00 2001 From: hui lai <1353307710@qq.com> Date: Thu, 15 Aug 2024 16:19:59 +0800 Subject: [PATCH] [fix](stream load) do not throw exception but skip record when can not find database (#39360) When fetch stream load record from BE node, if can not find database, StreamLoadRecordMgr will throw exception and the remaining records will not be recorded in memory. For example: Ten stream load records were pulled, and the database associated with the stream load of the first record was deleted by the user. Therefore, the pull will end, resulting in the remaining nine records not being consumed recorded in memory. This pr do not throw exception but skip record when can not find database to solve this problem. --- .../main/java/org/apache/doris/load/StreamLoadRecordMgr.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/StreamLoadRecordMgr.java b/fe/fe-core/src/main/java/org/apache/doris/load/StreamLoadRecordMgr.java index f44e8b785f6ae1..cd504528998d8b 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/load/StreamLoadRecordMgr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/load/StreamLoadRecordMgr.java @@ -22,7 +22,6 @@ import org.apache.doris.catalog.Env; import org.apache.doris.common.ClientPool; import org.apache.doris.common.Config; -import org.apache.doris.common.UserException; import org.apache.doris.common.io.Text; import org.apache.doris.common.io.Writable; import org.apache.doris.common.util.MasterDaemon; @@ -315,7 +314,8 @@ protected void runAfterCatalogReady() { if (Strings.isNullOrEmpty(streamLoadItem.getCluster())) { dbName = streamLoadItem.getDb(); } - throw new UserException("unknown database, database=" + dbName); + LOG.warn("unknown database, database=" + dbName); + continue; } long dbId = db.getId(); Env.getCurrentEnv().getStreamLoadRecordMgr()