Skip to content

Commit

Permalink
[Bug] Clear Txn when load been cancelled (apache#3766)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
chaoyli authored and morningman-cmy committed Jun 7, 2020
1 parent 6aef8dc commit 494c8ff
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 494c8ff

Please sign in to comment.