{"record":{"id":"2aad152779e53de5","repo":"apache/iceberg","slug":"unsupported-status","errorCode":null,"errorMessage":"Unsupported status: ","messagePattern":"Unsupported status: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/AbstractIcebergEnumerator.java","lineNumber":156,"sourceCode":"      GetSplitResult getResult = assigner.getNext(hostname);\n      if (getResult.status() == GetSplitResult.Status.AVAILABLE) {\n        LOG.info(\"Assign split to subtask {}: {}\", awaitingSubtask, getResult.split());\n        enumeratorContext.assignSplit(getResult.split(), awaitingSubtask);\n        awaitingReader.remove();\n      } else if (getResult.status() == GetSplitResult.Status.CONSTRAINED) {\n        getAvailableFutureIfNeeded();\n        break;\n      } else if (getResult.status() == GetSplitResult.Status.UNAVAILABLE) {\n        if (shouldWaitForMoreSplits()) {\n          getAvailableFutureIfNeeded();\n          break;\n        } else {\n          LOG.info(\"No more splits available for subtask {}\", awaitingSubtask);\n          enumeratorContext.signalNoMoreSplits(awaitingSubtask);\n          awaitingReader.remove();\n        }\n      } else {\n        throw new IllegalArgumentException(\"Unsupported status: \" + getResult.status());\n      }\n    }\n  }\n\n  /** return true if enumerator should wait for splits like in the continuous enumerator case */\n  protected abstract boolean shouldWaitForMoreSplits();\n\n  private synchronized void getAvailableFutureIfNeeded() {\n    if (availableFuture.get() != null) {\n      return;\n    }\n\n    CompletableFuture<Void> future =\n        assigner\n            .isAvailable()\n            .thenAccept(\n                ignore ->\n                    // Must run assignSplits in coordinator thread","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/AbstractIcebergEnumerator.java#L138-L174","documentation":"During assignSplits, the enumerator checks the SplitResult status from the split assigner; only an assignment status is supported, and any other status triggers this IllegalArgumentException. It indicates the assigner returned an unexpected internal state.","triggerScenarios":"Called from handleSourceEvent, addSplitsBack, or a future callback when the SplitAssigner's getResult().status() is something other than the expected assignment status.","commonSituations":"A custom SplitAssigner implementation returning a non-standard status; internal bug or version mismatch in connector components.","solutions":["Verify you are using the built-in Iceberg split assigner or that your custom assigner returns a supported SplitResult status.","Align connector versions across the cluster to avoid mixed assigner/enumerator behavior.","File/report with the SplitResult status value; this is an internal invariant violation, not user input error."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Wrap job restart policy to capture enumerator failure cause\nenv.setRestartStrategy(RestartStrategies.failureRateRestart(3, Time.days(1), Time.minutes(1)));\n// catch in a custom enumerator subclass if using a custom assigner:\ntry { assignSplits(); } catch (IllegalArgumentException e) { LOG.error(\"SplitResult status invalid\", e); }","preventionTips":["Do not implement custom SplitAssigner variants that return non-standard SplitResult statuses","Keep enumerator and assigner from the same connector release","Capture JobManager logs when this occurs to identify the status value"],"tags":["flink","source-enumerator","internal-state","illegal-argument"],"backgroundTag":"internal-invariant-violation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}