apache/druid · error · org.apache.druid.java.util.common.RE

Unknown version

Error message

Unknown version 

What it means

VariantColumnAndIndexSupplier.read only knows how to deserialize the serialized column versions it supports (currently V1). If the column version byte read from the segment is anything else, it throws RE 'Unknown version <version>'. This guards against reading segments written by newer or incompatible Druid writers.

Solutions

  1. Upgrade all Druid services to a version supporting the column version found in the segment
  2. Re-ingest the affected segments with the current Druid version to rewrite the column
  3. Check the segment metadata to confirm the writer version
  4. Avoid downgrading clusters while serving segments written by newer versions

Example fix

// before
// running Druid 31.x against a V2 variant column segment
// after
// upgrade to the Druid release that supports the column version, or re-ingest: mvn/cluster upgrade + reindex task
Defensive patterns

Strategy: validation

Validate before calling

int version = serRead.read(); if (version > MAX_SUPPORTED_VERSION) { throw new SegmentNotReadableException("column version " + version + " needs newer Druid"); }

Try / catch

try { return supplier.read(buffer); } catch (RE e) { if (String.valueOf(e.getMessage()).startsWith("Unknown version")) { /* fail segment load with clear upgrade hint */ } throw e; }

Prevention

When it happens

Trigger: Opening a segment whose variant column was written with a version byte newer than the running Druid's supported versions, or a corrupted segment where the version byte is garbage.

Common situations: Rolling upgrades where newer data (new segment format) is served by older historical nodes; downgrading a Druid cluster without re-ingesting; corrupted segment payloads.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/a0125745660c09a5. Report an issue: GitHub.

Appendix: source

Thrown at processing/src/main/java/org/apache/druid/segment/nested/VariantColumnAndIndexSupplier.java:208

        return new VariantColumnAndIndexSupplier(
            logicalType,
            variantTypeByte,
            stringDictionarySupplier,
            longDictionarySupplier,
            doubleDictionarySupplier,
            arrayDictionarySupplier,
            arrayElementDictionarySupplier,
            ints,
            valueIndexes,
            arrayElementIndexes,
            bitmapSerdeFactory.getBitmapFactory()
        );
      }
      catch (IOException ex) {
        throw new RE(ex, "Failed to deserialize V%s column.", version);
      }
    } else {
      throw new RE("Unknown version " + version);
    }
  }


  private final ColumnType logicalType;
  @Nullable
  private final Byte variantTypeSetByte;
  private final BitmapFactory bitmapFactory;
  private final Supplier<? extends Indexed<ByteBuffer>> stringDictionarySupplier;
  private final Supplier<FixedIndexed<Long>> longDictionarySupplier;
  private final Supplier<FixedIndexed<Double>> doubleDictionarySupplier;
  private final Supplier<FrontCodedIntArrayIndexed> arrayDictionarySupplier;
  private final Supplier<FixedIndexed<Integer>> arrayElementDictionarySupplier;
  private final Supplier<ColumnarInts> encodedValueColumnSupplier;
  private final GenericIndexed<ImmutableBitmap> valueIndexes;
  private final GenericIndexed<ImmutableBitmap> arrayElementIndexes;
  private final ImmutableBitmap nullValueBitmap;

View on GitHub (pinned to 9b90983fd2)