Skip to content

Commit

Permalink
[enhancement](schema-change) Record detailed fail reason for schema c…
Browse files Browse the repository at this point in the history
…hange tasks
  • Loading branch information
TangSiyang2001 committed Aug 14, 2024
1 parent 1f87ecf commit f0602cf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ protected void runRunningJob() throws AlterCancelException {
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();
Expand All @@ -564,8 +564,8 @@ protected void runRunningJob() throws AlterCancelException {
.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()));
}
}
}
Expand Down

0 comments on commit f0602cf

Please sign in to comment.