{"record":{"id":"661f2faca7511734","repo":"apache/iceberg","slug":"invalid-operator-event-type-661f2f","errorCode":null,"errorMessage":"Invalid operator event type: ","messagePattern":"Invalid operator event type: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink/v2.2/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.2/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/LockRemoverCoordinator.java#L31-L61","documentation":"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).","triggerScenarios":"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.","commonSituations":"Mixing operator versions during a savepoint restore across Iceberg versions, or wiring the wrong OperatorEventGateway so register events land on the remover coordinator.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (!(event instanceof LockReleaseEvent)) {\n  LOG.warn(\"Skipping unexpected operator event: {}\", event.getClass());\n  return;\n}","typeGuard":"boolean isLockRelease(OperatorEvent e) { return e instanceof LockReleaseEvent; }","tryCatchPattern":"try {\n  gateway.sendEventToCoordinator(new LockReleaseEvent(lockId));\n} catch (IllegalArgumentException e) {\n  LOG.error(\"Coordinator rejected event\", e);\n}","preventionTips":["Only send LockReleaseEvent from subtasks to the remover coordinator.","Keep Iceberg versions consistent across job restarts."],"tags":["flink","operator-event","illegal-argument"],"backgroundTag":"invalid-argument-value","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"}