WingsGo commented on issue #2447: Finish schema change after try three times
URL: https://github.com/apache/incubator-doris/pull/2447#issuecomment-565735344
 
 
   > You'd better not deal with AlterJob's error logic here, as this will lead 
to a messy code structure.
   > Here is my advise:
   > 
   > 1. In `MasterImpl.java`
   >    You will find a comment `// We start to let FE perceive the task's 
error msg`. And you should add
   >    "&& taskType != TTaskType.ALTER" in the following `if` clause. So that 
even this is a failure task
   >    report, it can still be passed to `finishAlterTask()`.
   > 2. In `finishAlterTask()`
   >    We are currently only dealing with successful tasks here, and you need 
to modify this method to
   >    also deal with the failed task. And you can just set some error msgs of 
failure counter into the
   >    agent task. And no need to get the AlterJob.
   > 3. In `RollupJobV2` and `SchemaChangeJobV2`
   >    Both `RollupJobV2` and `SchemaChangeJobV2` have method 
`runRunningJob()`. In this method,
   >    you can check the tasks' status in `rollupBatchTask` or 
`schemaChangeBatchTask`. The tasks here
   >    are same as you got in `finishAlterTask()`. And if you find that some 
of tasks are failed more than 3
   >    times. you can just throw an `AlterCancelException`, so that the job 
will be cancelled automatically.
   
   I think the error msgs of failure counter have been record in following, so 
I think I only need to change SchemaChangeJobV2 and RollupJobV2.
   ```
   if (taskStatus.getStatus_code() != TStatusCode.OK) {
                   task.failed();
                   // We start to let FE perceive the task's error msg
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to