apache/seatunnel · error · DorisConnectorException

SHOULD_NEVER_HAPPEN

SHOULD_NEVER_HAPPEN

Error message

the table '%s.%s' cannot be found in table_list of job configuration.

What it means

During pollNext, a Doris source split references a database/table that is absent from the reader's tables map built from the job configuration's table_list. This is treated as an internal invariant violation: split enumeration and reader config are out of sync.

Source

Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/source/reader/DorisSourceReader.java:83

    public void open() throws Exception {}

    @Override
    public void close() throws IOException {
        if (valueReader != null) {
            valueReader.close();
        }
    }

    @Override
    public void pollNext(Collector<SeaTunnelRow> output) throws Exception {
        synchronized (output.getCheckpointLock()) {
            DorisSourceSplit nextSplit = splitsQueue.poll();
            if (nextSplit != null) {
                PartitionDefinition partition = nextSplit.getPartitionDefinition();
                DorisSourceTable dorisSourceTable =
                        tables.get(TablePath.of(partition.getDatabase(), partition.getTable()));
                if (dorisSourceTable == null) {
                    throw new DorisConnectorException(
                            DorisConnectorErrorCode.SHOULD_NEVER_HAPPEN,
                            String.format(
                                    "the table '%s.%s' cannot be found in table_list of job configuration.",
                                    partition.getDatabase(), partition.getTable()));
                }
                valueReader = new DorisValueReader(partition, dorisSourceConfig, dorisSourceTable);
                while (valueReader.hasNext()) {
                    SeaTunnelRow record = valueReader.next();
                    output.collect(record);
                }
            }
            if (Boundedness.BOUNDED.equals(context.getBoundedness())
                    && noMoreSplits
                    && splitsQueue.isEmpty()) {
                // signal to the source that we have reached the end of the data.
                log.info("Closed the bounded Doris source");
                context.signalNoMoreElement();
            }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Restore only from checkpoints/savepoints produced with the identical table_list configuration
  2. Verify database/table names in table_list match case-sensitively what the splits reference
  3. Re-run the job from scratch (no state) after fixing configuration
  4. Check for version drift: savepoint generated by a different SeaTunnel/Doris connector version
Defensive patterns

Strategy: validation

Validate before calling

// before job start, verify table_list covers all expected tables
assert jobConfig.tableList.stream().map(t -> t.database + "." + t.table)
    .collect(Collectors.toSet()).contains(db + "." + table);

Try / catch

try { reader.pollNext(); } catch (DorisConnectorException e) { if (e.getMessage().contains("cannot be found in table_list")) { LOG.error("restore-state config mismatch; restart job without state or fix table_list"); } throw e; }

Prevention

When it happens

Trigger: A DorisSourceSplit whose PartitionDefinition database/table has no matching entry in tables (keyed by TablePath.of(database, table)) when the reader dequeues the next split.

Common situations: Job restored from a savepoint/checkpoint whose splits were enumerated with a different table_list than the current config; case-sensitive database/table name mismatches; dynamic table discovery changed between runs.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/6d1258d5cbf2059d. Report an issue: GitHub.