apache/iceberg · error · IllegalArgumentException
Invalid operator event type:
Error message
Invalid operator event type:
What it means
LockRemoverCoordinator.handleEventFromOperator handles OperatorEvents sent from TriggerManager subtasks to the coordinator. It only accepts LockReleaseEvent; any other event type results in this IllegalArgumentException. The check happens inside a Tasks.foreach failure-handling wrapper, so the exception is wrapped with context (subtask, attempt number).
Source
Thrown at flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/LockRemoverCoordinator.java:49
LockRemoverCoordinator(String operatorName, Context context) {
super(operatorName, context);
LOG.info("Created LockRemoverCoordinator: {}", operatorName);
}
@Override
public void handleEventFromOperator(int subtask, int attemptNumber, OperatorEvent event) {
runInCoordinatorThread(
() -> {
LOG.debug(
"Handling event from subtask {} (#{}) of {}: {}",
subtask,
attemptNumber,
operatorName(),
event);
if (event instanceof LockReleaseEvent) {
handleReleaseLock((LockReleaseEvent) event);
} else {
throw new IllegalArgumentException(
"Invalid operator event type: " + event.getClass().getCanonicalName());
}
},
String.format(
Locale.ROOT,
"handling operator event %s from subtask %d (#%d)",
event.getClass(),
subtask,
attemptNumber));
}
}
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Ensure only LockReleaseEvent instances are sent to the LockRemover coordinator's event gateway.
- Check that LockRegisterEvent is sent to TriggerManagerCoordinator, not LockRemoverCoordinator.
- Restore the job with the same Iceberg version used to create the savepoint to avoid event type mismatch.
Defensive patterns
Strategy: try-catch
Validate before calling
if (!(event instanceof LockReleaseEvent)) {
LOG.warn("Skipping unexpected operator event: {}", event.getClass());
return;
} Type guard
boolean isLockRelease(OperatorEvent e) { return e instanceof LockReleaseEvent; } Try / catch
try {
gateway.sendEventToCoordinator(new LockReleaseEvent(lockId));
} catch (IllegalArgumentException e) {
LOG.error("Coordinator rejected event", e);
} Prevention
- Only send LockReleaseEvent from subtasks to the remover coordinator.
- Keep Iceberg versions consistent across job restarts.
When it happens
Trigger: An OperatorEvent that is not a LockReleaseEvent is delivered to the LockRemover coordinator, e.g. a LockRegisterEvent sent to the wrong coordinator, or a custom/mismatched event from version-skewed operators during a job upgrade.
Common situations: Mixing operator versions during a savepoint restore across Iceberg versions, or wiring the wrong OperatorEventGateway so register events land on the remover coordinator.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Invalid operator event type:
- Invalid operator event type:
- Invalid operator event type:
- Invalid operator event type:
- Invalid operator event type: <event.getClass().getCanonicalN
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/661f2faca7511734.
Report an issue: GitHub.