apache/iceberg · error · IOException

Unrecognized version or corrupt state:

Error message

Unrecognized version or corrupt state: 

What it means

WriteResultSerializer.deserialize throws this IOException when the version byte of the serialized payload does not match the expected CURRENT_VERSION, indicating data written by an incompatible serializer version or corrupt/truncated bytes.

Source

Thrown at flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/WriteResultSerializer.java:61

    byte[] result = InstantiationUtil.serializeObject(writeResult);
    view.write(result);
    return out.toByteArray();
  }

  @Override
  public WriteResult deserialize(int version, byte[] serialized) throws IOException {
    if (version == 1) {
      DataInputDeserializer view = new DataInputDeserializer(serialized);
      byte[] resultBuf = new byte[serialized.length];
      view.read(resultBuf);
      try {
        return InstantiationUtil.deserializeObject(
            resultBuf, IcebergCommittableSerializer.class.getClassLoader());
      } catch (ClassNotFoundException cnc) {
        throw new IOException("Could not deserialize the WriteResult object", cnc);
      }
    }
    throw new IOException("Unrecognized version or corrupt state: " + version);
  }
}

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Restore with the connector version that originally wrote the checkpoint/savepoint
  2. If the version change is intentional, drain the old job fully and start the new job without restoring committable state
  3. Verify checkpoint storage integrity and fall back to an earlier checkpoint if corruption is suspected
Defensive patterns

Strategy: try-catch

Try / catch

try {
  result = serializer.deserialize(version, view);
} catch (IOException e) {
  if (e.getMessage().contains("Unrecognized version")) {
    LOG.error("Incompatible WriteResult serializer version {} — restore with original job's Iceberg version", version);
  }
  throw e;
}

Prevention

When it happens

Trigger: Reading a WriteResult-carrying committable from a checkpoint/savepoint produced by a different Iceberg/Flink connector version, or deserializing corrupted byte arrays.

Common situations: Iceberg upgrade/downgrade between job restarts from savepoint; state compatibility not enabled; corrupted committed-state storage.

Understand the failure class

Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/f5de53c1fdcfebce. Report an issue: GitHub.