airborne12 commented on code in PR #42295:
URL: https://github.com/apache/doris/pull/42295#discussion_r1825344549


##########
fe/fe-core/src/main/java/org/apache/doris/alter/IndexChangeJob.java:
##########
@@ -370,17 +372,22 @@ protected void runRunningJob() throws 
AlterCancelException {
             LOG.info("inverted index tasks not finished. job: {}, partitionId: 
{}", jobId, partitionId);
             List<AgentTask> tasks = 
invertedIndexBatchTask.getUnfinishedTasks(2000);
             for (AgentTask task : tasks) {
-                if (task.getFailedTimes() > 3) {
+                if (task.getFailedTimes() >= MAX_FAILED_NUM) {
                     LOG.warn("alter inverted index task failed: " + 
task.getErrorMsg());
-                    List<Long> failedBackends = 
failedTabletBackends.computeIfAbsent(task.getTabletId(),
-                            k -> Lists.newArrayList());
+                    // If error is E-216, it indicates obtaining lock failed.
+                    // we should retry this task.
+                    if (task.getErrorMsg().contains("E-216")) {

Review Comment:
   it is not robust to do string contains here. Is there any other way ? Error 
code etc.



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to