From 494c8ffedca97e0c55592f26f927cec48aaaadbb 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 3ec703294560ee..057d3cdb9591d9 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 @@ private void loadTxnRollbackImpl(TLoadTxnRollbackRequest request) throws UserExc 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"); }