This is an automated email from the ASF dual-hosted git repository.
morningman 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 385ccf7 [fix](routine-load) fix show routine load task error (#8195)
385ccf7 is described below
commit 385ccf7c8a49e3364c4177ae46676ab08ddecb99
Author: Henry2SS <[email protected]>
AuthorDate: Sat Feb 26 17:04:39 2022 +0800
[fix](routine-load) fix show routine load task error (#8195)
---
.../java/org/apache/doris/load/routineload/RoutineLoadJob.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java
b/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java
index 0026b80..94523a1 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java
@@ -31,6 +31,7 @@ import org.apache.doris.catalog.Catalog;
import org.apache.doris.catalog.Database;
import org.apache.doris.catalog.OlapTable;
import org.apache.doris.catalog.Table;
+import org.apache.doris.common.AnalysisException;
import org.apache.doris.common.Config;
import org.apache.doris.common.DdlException;
import org.apache.doris.common.FeMetaVersion;
@@ -1310,7 +1311,14 @@ public abstract class RoutineLoadJob extends
AbstractTxnStateChangeCallback impl
public List<List<String>> getTasksShowInfo() {
List<List<String>> rows = Lists.newArrayList();
- routineLoadTaskInfoList.stream().forEach(entity ->
rows.add(entity.getTaskShowInfo()));
+ routineLoadTaskInfoList.stream().forEach(entity -> {
+ try {
+
entity.setTxnStatus(Catalog.getCurrentCatalog().getGlobalTransactionMgr().getDatabaseTransactionMgr(dbId).getTransactionState(entity.getTxnId()).getTransactionStatus());
+ rows.add(entity.getTaskShowInfo());
+ } catch (AnalysisException e) {
+ LOG.warn("failed to setTxnStatus db: {}, txnId: {}, err: {}",
dbId, entity.getTxnId(), e.getMessage());
+ }
+ });
return rows;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]