From 0681fe89246b7e81d2379c71153d7110d9ca5170 Mon Sep 17 00:00:00 2001 From: chaoyli Date: Wed, 3 Jun 2020 21:13:17 +0800 Subject: [PATCH] [Bug] Clear Txn when load been cancelled 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"); }