{"record":{"id":"3a7d93768dc089ce","repo":"apache/iceberg","slug":"received-invalid-default-split-request-event-from-3a7d93","errorCode":null,"errorMessage":"Received invalid default split request event from subtask %d as Iceberg source uses custom split request event","messagePattern":"Received invalid default split request event from subtask (.+?) as Iceberg source uses custom split request event","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/AbstractIcebergEnumerator.java","lineNumber":78,"sourceCode":"        // excessive memory footprint. Some pending splits may not have been discovered yet.\n        .setUnassignedSplitsGauge(() -> Long.valueOf(assigner.pendingSplitCount()));\n    this.enumeratorContext.metricGroup().gauge(\"pendingRecords\", assigner::pendingRecords);\n  }\n\n  @Override\n  public void start() {\n    assigner.start();\n  }\n\n  @Override\n  public void close() throws IOException {\n    assigner.close();\n  }\n\n  @Override\n  public void handleSplitRequest(int subtaskId, @Nullable String requesterHostname) {\n    // Iceberg source uses custom split request event to piggyback finished split ids.\n    throw new UnsupportedOperationException(\n        String.format(\n            Locale.ROOT,\n            \"Received invalid default split request event \"\n                + \"from subtask %d as Iceberg source uses custom split request event\",\n            subtaskId));\n  }\n\n  @Override\n  public void handleSourceEvent(int subtaskId, SourceEvent sourceEvent) {\n    if (sourceEvent instanceof SplitRequestEvent) {\n      SplitRequestEvent splitRequestEvent = (SplitRequestEvent) sourceEvent;\n      LOG.info(\"Received request split event from subtask {}\", subtaskId);\n      assigner.onCompletedSplits(splitRequestEvent.finishedSplitIds());\n      readersAwaitingSplit.put(subtaskId, splitRequestEvent.requesterHostname());\n      assignSplits();\n    } else {\n      throw new IllegalArgumentException(\n          String.format(","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/AbstractIcebergEnumerator.java#L60-L96","documentation":"AbstractIcebergEnumerator.handleSplitRequest overrides the default FLIP-27 enumerator hook. The Iceberg source does not use the framework's default split-request mechanism; readers instead send a custom SplitRequestEvent via handleSourceEvent so they can piggyback finished split ids. Receiving a default split request means a reader (or foreign event source) is not using the Iceberg source protocol, so the enumerator throws UnsupportedOperationException naming the offending subtask id.","triggerScenarios":"A SourceReader sends a plain default split request (e.g., a non-Iceberg reader added to the same source, or custom reader code calling context.sendSplitRequest() instead of emitting SplitRequestEvent) while an AbstractIcebergEnumerator is the enumerator.","commonSituations":"Custom/patched IcebergSourceReader modifications; mixing source reader implementations after a Flink version upgrade; accidentally using the generic SourceReader base class without the Iceberg split-request event.","solutions":["Use the stock IcebergSourceReader (IcebergSourceReaderBase subclasses) which sends SplitRequestEvent, not the default request.","Remove custom reader code that calls SourceReaderContext.sendSplitRequest(); instead emit SplitRequestEvent with finished split ids.","Verify no non-Iceberg readers are connected to this enumerator (check subtask id from the message in JobManager logs).","Align reader and enumerator versions — an old reader jar with a new enumerator can fall back to default requests."],"exampleFix":"// before\ncontext.sendSourceEvent(new DefaultSplitRequest()); // wrong: default protocol\n// after\ncontext.sendSourceEvent(new SplitRequestEvent(finishedSplitIds, requesterHostname));","handlingStrategy":"validation","validationCode":"// in custom reader code: never call the default request hook\n// ensure you emit the Iceberg event instead:\ncontext.sendSourceEvent(new SplitRequestEvent(finishedIds, requesterHostname));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always extend IcebergSourceReaderBase so split requests use the Iceberg protocol.","Never call SourceReaderContext.sendSplitRequest() with the Iceberg enumerator.","Pin one iceberg-flink version across all task nodes."],"tags":["flink","source-enumerator","protocol-violation","unsupported-operation"],"backgroundTag":"unsupported-operation","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"}