apache/seatunnel · warning
Task init is not complete, try to get it again after 200 ms
Error message
Task init is not complete, try to get it again after 200 ms
What it means
SourceSplitEnumeratorTask.getEnumerator() blocks until the task's asynchronous initialization (restoreComplete future) is created. If a caller asks for the enumerator before Init has run, it logs this warning and sleeps 200ms in a loop until init completes.
Solutions
- Usually self-healing — the task completes init and proceeds; no action needed if transient
- If it loops indefinitely, check the task's init failure in logs (an exception in init will leave restoreComplete unset)
- Reduce slow init causes: verify source connectivity (DB/broker) and credentials so init completes quickly
- Upgrade SeaTunnel if recurring races are seen in your version
Defensive patterns
Strategy: retry
Validate before calling
// ensure init can finish fast by pre-checking source connectivity // before submitting: verify DB/broker reachable nc -z <source-host> <source-port> || echo 'source unreachable: init will be slow'
Try / catch
// the engine-side loop is built in; operators should watch for it repeating
if (logLines.filter(l => l.contains('Task init is not complete')).length > 50) {
investigateSourceInitialization();
} Prevention
- Verify source system reachability and credentials so task init completes quickly
- Avoid hammering the job with split/checkpoint requests during recovery; give tasks time to init
- Monitor this warning's frequency — a long-running loop indicates a stuck init
- Keep SeaTunnel updated; init/task startup races are fixed over time
When it happens
Trigger: Any early call path touching the enumerator — getSplitSerializer, addSplitsBack, requestSplit, handleSourceEvent, notifyCheckpointComplete — arriving before the task executed init(), e.g. a split request or source event racing task startup after restore/recovery.
Common situations: Job recovery/failover where the coordinator sends split requests or checkpoint notifications before the restarted task finishes initialization; slow connector init (network to broker/DB) while the engine already issues requests.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- No reader is obtained, skip this assign!
- BigtableSourceSplitEnumerator already closed; cannot create…
- BigtableSourceSplitEnumerator closed during client creation
- BUFFER_ADD_FAILED
- Checkpoint storage is unavailable
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/6b628ce4177485d5.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SourceSplitEnumeratorTask.java:288
public TaskLocation getTaskMemberLocation(long taskID) {
return taskIDToTaskLocationMapping.get(taskID);
}
public Address getTaskMemberAddressByIndex(int taskIndex) {
return taskMemberMapping.get(taskIndexToTaskLocationMapping.get(taskIndex));
}
public TaskLocation getTaskMemberLocationByIndex(int taskIndex) {
return taskIndexToTaskLocationMapping.get(taskIndex);
}
private SourceSplitEnumerator<SplitT, Serializable> getEnumerator()
throws InterruptedException, ExecutionException {
// (restoreComplete == null) means that the Task has not yet executed Init, so we need to
// wait.
while (null == restoreComplete) {
log.warn("Task init is not complete, try to get it again after 200 ms");
Thread.sleep(200);
}
restoreComplete.get();
return enumerator;
}
public void readerFinished(TaskLocation taskLocation) {
unfinishedReaders.remove(taskLocation.getTaskID());
if (unfinishedReaders.isEmpty()) {
prepareCloseStatus = true;
} else if (Boundedness.UNBOUNDED.equals(this.source.getSource().getBoundedness())) {
log.info(
"Send close idle reader {} operation of unbounded job. {}",
taskLocation.getTaskIndex(),
taskLocation);
this.getExecutionContext()
.sendToMaster(new CloseIdleReaderOperation(jobID, taskLocation))
.join();View on GitHub (pinned to cf67b549a7)