{"record":{"id":"2289d348c91c3a66","repo":"apache/iceberg","slug":"invalid-operator-event-type","errorCode":null,"errorMessage":"Invalid operator event type: ","messagePattern":"Invalid operator event type: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/LockRemoverCoordinator.java","lineNumber":49,"sourceCode":"  LockRemoverCoordinator(String operatorName, Context context) {\n    super(operatorName, context);\n    LOG.info(\"Created LockRemoverCoordinator: {}\", operatorName);\n  }\n\n  @Override\n  public void handleEventFromOperator(int subtask, int attemptNumber, OperatorEvent event) {\n    runInCoordinatorThread(\n        () -> {\n          LOG.debug(\n              \"Handling event from subtask {} (#{}) of {}: {}\",\n              subtask,\n              attemptNumber,\n              operatorName(),\n              event);\n          if (event instanceof LockReleaseEvent) {\n            handleReleaseLock((LockReleaseEvent) event);\n          } else {\n            throw new IllegalArgumentException(\n                \"Invalid operator event type: \" + event.getClass().getCanonicalName());\n          }\n        },\n        String.format(\n            Locale.ROOT,\n            \"handling operator event %s from subtask %d (#%d)\",\n            event.getClass(),\n            subtask,\n            attemptNumber));\n  }\n}\n","sourceCodeStart":31,"sourceCodeEnd":61,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/LockRemoverCoordinator.java#L31-L61","documentation":"LockRemoverCoordinator.handleEventFromOperator accepts only LockReleaseEvent operator events from subtasks; any other event type throws IllegalArgumentException including the event's canonical class name. The coordinator wraps handling so failures are reported as a failed 'handling operator event' action.","triggerScenarios":"An operator in the maintenance pipeline sends an OperatorEvent that is not a LockReleaseEvent to the coordinator — e.g. a mismatched event class after mixed-version deploy or a custom event sent to the wrong coordinator.","commonSituations":"Restoring a job from a savepoint made with a different Iceberg version whose event classes differ; custom extension code emitting extra operator events to the coordinator.","solutions":["Ensure all maintenance pipeline operators and the coordinator run the same Iceberg build (redeploy fully, don't mix versions across savepoint restore).","Inspect the class name in the message and remove/redirect the code path sending that event type to the lock coordinator.","Only send LockReleaseEvent (e.g. after a successful or failed maintenance cycle) to this coordinator."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":"if (event instanceof LockReleaseEvent release) {\n  handleReleaseLock(release);\n} else {\n  LOG.warn(\"Ignoring non-release operator event: {}\", event.getClass());\n}","tryCatchPattern":"try {\n  handleEventFromOperator(subtask, attempt, event);\n} catch (IllegalArgumentException e) {\n  LOG.error(\"Unexpected operator event {} - check for version-mixed deployment\",\n      e.getMessage());\n}","preventionTips":["Deploy planner/reader/coordinator as one consistent build; avoid mixed-version rolling upgrades mid-cycle","Only send LockReleaseEvent to the lock-remover coordinator","Don't restore operator event flows from savepoints of incompatible versions"],"tags":["flink","operator-event","coordinator","type-mismatch"],"backgroundTag":"type-mismatch","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}