This is an automated email from the ASF dual-hosted git repository.

lichaoyong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b2cf1c  [Bug] Clear Txn when load been cancelled (#3766)
9b2cf1c is described below

commit 9b2cf1c18efcbc69738a5a45f269c6ec7785b34b
Author: lichaoyong <lichaoyong...@gmail.com>
AuthorDate: Thu Jun 4 18:18:37 2020 +0800

    [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.
---
 fe/src/main/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 3ec7032..057d3cd 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");
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to