{"record":{"id":"d4665d4e13c14eb4","repo":"apache/iceberg","slug":"received-invalid-default-split-request-event-from","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/v1.20/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/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/AbstractIcebergEnumerator.java#L60-L96","documentation":"AbstractIcebergEnumerator.handleSplitRequest always throws UnsupportedOperationException because the Iceberg FLIP-27 source communicates split requests via a custom SplitRequestEvent that piggybacks finished split ids; the framework's default request path must never be used. Receiving a default split request means a reader subtask sent a non-Iceberg request event to the enumerator.","triggerScenarios":"A SourceReader (or custom reader) calls context.sendSplitRequest() with the default event instead of the custom Iceberg SplitRequestEvent, or a custom/patched reader version is mixed with the Iceberg enumerator.","commonSituations":"Custom SourceReader implementations built on IcebergSource reader infrastructure but using vanilla split request APIs, mixed cluster versions during upgrade, or third-party readers targeting the wrong enumerator.","solutions":["Use the Iceberg custom SplitRequestEvent (via SourceReaderContext/sendSplitRequest with the Iceberg event class) in any custom reader","Ensure all reader subtasks run the same Iceberg version as the enumerator","If using stock IcebergSource readers, check for mixed jars on the classpath (duplicate iceberg-flink versions)","Do not call the default sendSplitRequest() from readers; rely on the enumerator's assignment logic"],"exampleFix":"// before: custom reader using default request\ncontext.sendSplitRequest();\n// after: use Iceberg's custom event carrying finished split ids\ncontext.sendSourceEventIfSupported(\n    new SplitRequestEvent(finishedSplitIds));","handlingStrategy":"validation","validationCode":"// readers must never use the default split request path\nPreconditions.checkState(\n    event instanceof SplitRequestEvent,\n    \"Iceberg readers must send SplitRequestEvent, not default requests\");","typeGuard":"if (event instanceof SplitRequestEvent) { /* forward to enumerator */ }","tryCatchPattern":"// enumerator side: not catchable — design readers to never trigger it\n// reader side: ensure custom event type is registered with the serializer","preventionTips":["Use Iceberg's custom SplitRequestEvent in any custom reader","Keep iceberg-flink jars at one version on the classpath","Rely on enumerator auto-assignment instead of default sendSplitRequest()"],"tags":["flink","source","enumerator","unsupported-operation","split-request"],"backgroundTag":"unsupported-operation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}