This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new e4349948d70 [enhancement](schema-change) Record detailed fail reason
for schema change tasks (#39351)
e4349948d70 is described below
commit e4349948d70d67f7c5d22855ccac38161d4c583c
Author: Siyang Tang <[email protected]>
AuthorDate: Thu Aug 15 20:21:28 2024 +0800
[enhancement](schema-change) Record detailed fail reason for schema change
tasks (#39351)
## Proposed changes
Expose the error msg from BE as the real fail reason recorded for schema
change tasks. To avoid too much memory usage, we just pick one among all
to record.
---
.../src/main/java/org/apache/doris/alter/SchemaChangeJobV2.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJobV2.java
b/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJobV2.java
index 539ebcb6834..9dab4f2d356 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJobV2.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJobV2.java
@@ -553,7 +553,7 @@ public class SchemaChangeJobV2 extends AlterJobV2 {
if (task.getFailedTimes() > 0) {
task.setFinished(true);
AgentTaskQueue.removeTask(task.getBackendId(),
TTaskType.ALTER, task.getSignature());
- LOG.warn("schema change task failed: " +
task.getErrorMsg());
+ LOG.warn("schema change task failed: {}",
task.getErrorMsg());
List<Long> failedBackends =
failedTabletBackends.get(task.getTabletId());
if (failedBackends == null) {
failedBackends = Lists.newArrayList();
@@ -564,8 +564,8 @@ public class SchemaChangeJobV2 extends AlterJobV2 {
.getReplicaAllocation(task.getPartitionId()).getTotalReplicaNum();
int failedTaskCount = failedBackends.size();
if (expectSucceedTaskNum - failedTaskCount <
expectSucceedTaskNum / 2 + 1) {
- throw new AlterCancelException("schema change tasks
failed on same tablet reach threshold "
- + failedTaskCount);
+ throw new AlterCancelException(
+ String.format("schema change tasks failed,
error reason: %s", task.getErrorMsg()));
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]