[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.
This commit is contained in:
lichaoyong
2020-06-04 18:18:37 +08:00
committed by GitHub
parent 484e7de3c5
commit 9b2cf1c18e

View File

@ -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");
}