From 9b2cf1c18efcbc69738a5a45f269c6ec7785b34b Mon Sep 17 00:00:00 2001 From: lichaoyong Date: Thu, 4 Jun 2020 18:18:37 +0800 Subject: [PATCH] [Bug] Clear Txn when load been cancelled (#3766) If you a load task encoutering error, it will be cancelled. At this time, FE will clear the Txn according to the DbName. In FE, DbName should be added by cluter name. If missing cluster name, it will encounter NullPointer. As a result, the Txn will still exists until timeout. --- .../java/org/apache/doris/service/FrontendServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fe/src/main/java/org/apache/doris/service/FrontendServiceImpl.java b/fe/src/main/java/org/apache/doris/service/FrontendServiceImpl.java index 3ec7032945..057d3cdb95 100644 --- a/fe/src/main/java/org/apache/doris/service/FrontendServiceImpl.java +++ b/fe/src/main/java/org/apache/doris/service/FrontendServiceImpl.java @@ -808,7 +808,8 @@ public class FrontendServiceImpl implements FrontendService.Iface { checkPasswordAndPrivs(cluster, request.getUser(), request.getPasswd(), request.getDb(), request.getTbl(), request.getUser_ip(), PrivPredicate.LOAD); } - Database db = Catalog.getInstance().getDb(request.getDb()); + String dbName = ClusterNamespace.getFullName(cluster, request.getDb()); + Database db = Catalog.getInstance().getDb(dbName); if (db == null) { throw new MetaNotFoundException("db " + request.getDb() + " does not exist"); }