apache/shardingsphere · error · IngestException

Unknown rowEventType: %s

Error message

Unknown rowEventType: %s

What it means

MppdbDecodingPlugin (openGauss incremental ingest) parses each WAL logical-decoding message into MppTableData and maps its opType string to PipelineSQLOperationType with valueOf. If the plugin emits an op type not present in that enum, an IngestException('Unknown rowEventType: <opType>') is thrown, aborting the incremental channel. It signals a mismatch between the decoding plugin's output vocabulary and what ShardingSphere can interpret.

Source

Thrown at kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/incremental/wal/decode/MppdbDecodingPlugin.java:128

        } else if (dataText.startsWith("{")) {
            result = readTableEvent(dataText);
        }
        return result;
    }
    
    private AbstractWALEvent decodeDataIgnoreTX(final String dataText) {
        return dataText.startsWith("{") ? readTableEvent(dataText) : new PlaceholderEvent();
    }
    
    private AbstractRowEvent readTableEvent(final String mppData) {
        MppTableData mppTableData;
        mppTableData = JsonUtils.fromJsonString(mppData, MppTableData.class);
        String rowEventType = mppTableData.getOpType();
        PipelineSQLOperationType type;
        try {
            type = PipelineSQLOperationType.valueOf(rowEventType);
        } catch (final IllegalArgumentException ex) {
            throw new IngestException("Unknown rowEventType: " + rowEventType);
        }
        AbstractRowEvent result;
        switch (type) {
            case INSERT:
                result = readWriteRowEvent(mppTableData);
                break;
            case UPDATE:
                result = readUpdateRowEvent(mppTableData);
                break;
            case DELETE:
                result = readDeleteRowEvent(mppTableData);
                break;
            default:
                throw new IngestException("Unknown rowEventType: " + rowEventType);
        }
        String[] tableMetaData = mppTableData.getTableName().split("\\.");
        result.setSchemaName(tableMetaData[0]);
        result.setTableName(tableMetaData[1]);

View on GitHub (pinned to e952770a21)

Solutions

  1. Identify the emitted opType from the message and confirm against PipelineSQLOperationType values supported by your ShardingSphere version.
  2. Avoid unsupported operations (notably TRUNCATE) on replicated tables, or handle them outside the pipeline.
  3. Align versions: use an openGauss/mppdb_decoding plugin whose output matches the ShardingSphere release, or upgrade ShardingSphere to one supporting the new op type.
  4. If the slot output is corrupted (JSON parse oddities), recreate the replication slot and restart incremental ingestion from a fresh snapshot.
Defensive patterns

Strategy: validation

Validate before calling

Set<String> known = Arrays.stream(PipelineSQLOperationType.values()).map(Enum::name).collect(Collectors.toSet());
// validate emitted opType before feeding the decoder (in tests / plugin contract checks)
if (!known.contains(opType)) { /* unsupported operation on source */ }

Try / catch

try {
    plugin.decode(dataText);
} catch (final IngestException ex) {
    if (ex.getMessage().startsWith("Unknown rowEventType")) {
        // identify the op, remove/avoid it on source, recreate slot, restart incremental
    }
}

Prevention

When it happens

Trigger: The openGauss logical replication slot sends a message whose opType field is not INSERT/UPDATE/DELETE (or differs in casing/format), e.g. TRUNCATE, BEGIN-like tags, or a plugin version that uses different operation codes; also malformed JSON whose opType parses as null.

Common situations: openGauss or mppdb_decoding plugin version emitting operation types ShardingSphere's PipelineSQLOperationType enum does not contain; TRUNCATE-heavy workloads on the source; upgrades on either side that add new op codes; mixed plugin output formats.

Related errors


AI-assisted analysis of apache/shardingsphere@e952770a21 (2026-08-14). Data as JSON: /api/errors/e470af30456cf4aa. Report an issue: GitHub.