Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip task scheduling error entries while processing scheduled tasks #14834

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -141,6 +141,8 @@ public class PinotTaskRestletResource {

private static final String TASK_QUEUE_STATE_STOP = "STOP";
private static final String TASK_QUEUE_STATE_RESUME = "RESUME";
public static final String GENERATION_ERRORS_KEY = "generationErrors";
public static final String SCHEDULING_ERRORS_KEY = "schedulingErrors";

@Inject
PinotHelixTaskResourceManager _pinotHelixTaskResourceManager;
@@ -667,8 +669,8 @@ public Map<String, String> scheduleTasks(
schedulingErrors.addAll(value.getSchedulingErrors());
});
}
response.put("generationErrors", String.join(",", generationErrors));
response.put("schedulingErrors", String.join(",", schedulingErrors));
response.put(GENERATION_ERRORS_KEY, String.join(",", generationErrors));
response.put(SCHEDULING_ERRORS_KEY, String.join(",", schedulingErrors));
return response;
}

Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@
import org.apache.pinot.common.auth.AuthProviderUtils;
import org.apache.pinot.common.minion.MinionClient;
import org.apache.pinot.common.utils.tls.TlsUtils;
import org.apache.pinot.controller.api.resources.PinotTaskRestletResource;
import org.apache.pinot.core.common.MinionConstants;
import org.apache.pinot.spi.auth.AuthProvider;
import org.apache.pinot.spi.config.table.TableConfig;
@@ -308,6 +309,11 @@ private boolean waitForMinionTaskToFinish(Map<String, String> scheduledTasks, lo
try {
boolean allCompleted = true;
for (String taskType : scheduledTasks.keySet()) {
// ignore the error message entries
if (taskType.equals(PinotTaskRestletResource.GENERATION_ERRORS_KEY)
|| taskType.equals(PinotTaskRestletResource.SCHEDULING_ERRORS_KEY)) {
continue;
}
String taskName = scheduledTasks.get(taskType);
String taskState = _minionClient.getTaskState(taskName);
if (!COMPLETED.equalsIgnoreCase(taskState)) {