{"record":{"id":"a0125745660c09a5","repo":"apache/druid","slug":"unknown-version-a01257","errorCode":null,"errorMessage":"Unknown version ","messagePattern":"Unknown version ","errorType":"exception","errorClass":"org.apache.druid.java.util.common.RE","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/segment/nested/VariantColumnAndIndexSupplier.java","lineNumber":208,"sourceCode":"        return new VariantColumnAndIndexSupplier(\n            logicalType,\n            variantTypeByte,\n            stringDictionarySupplier,\n            longDictionarySupplier,\n            doubleDictionarySupplier,\n            arrayDictionarySupplier,\n            arrayElementDictionarySupplier,\n            ints,\n            valueIndexes,\n            arrayElementIndexes,\n            bitmapSerdeFactory.getBitmapFactory()\n        );\n      }\n      catch (IOException ex) {\n        throw new RE(ex, \"Failed to deserialize V%s column.\", version);\n      }\n    } else {\n      throw new RE(\"Unknown version \" + version);\n    }\n  }\n\n\n  private final ColumnType logicalType;\n  @Nullable\n  private final Byte variantTypeSetByte;\n  private final BitmapFactory bitmapFactory;\n  private final Supplier<? extends Indexed<ByteBuffer>> stringDictionarySupplier;\n  private final Supplier<FixedIndexed<Long>> longDictionarySupplier;\n  private final Supplier<FixedIndexed<Double>> doubleDictionarySupplier;\n  private final Supplier<FrontCodedIntArrayIndexed> arrayDictionarySupplier;\n  private final Supplier<FixedIndexed<Integer>> arrayElementDictionarySupplier;\n  private final Supplier<ColumnarInts> encodedValueColumnSupplier;\n  private final GenericIndexed<ImmutableBitmap> valueIndexes;\n  private final GenericIndexed<ImmutableBitmap> arrayElementIndexes;\n  private final ImmutableBitmap nullValueBitmap;\n","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/nested/VariantColumnAndIndexSupplier.java#L190-L226","documentation":"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.","triggerScenarios":"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.","commonSituations":"Rolling upgrades where newer data (new segment format) is served by older historical nodes; downgrading a Druid cluster without re-ingesting; corrupted segment payloads.","solutions":["Upgrade all Druid services to a version supporting the column version found in the segment","Re-ingest the affected segments with the current Druid version to rewrite the column","Check the segment metadata to confirm the writer version","Avoid downgrading clusters while serving segments written by newer versions"],"exampleFix":"// before\n// running Druid 31.x against a V2 variant column segment\n// after\n// upgrade to the Druid release that supports the column version, or re-ingest: mvn/cluster upgrade + reindex task","handlingStrategy":"validation","validationCode":"int version = serRead.read(); if (version > MAX_SUPPORTED_VERSION) { throw new SegmentNotReadableException(\"column version \" + version + \" needs newer Druid\"); }","typeGuard":null,"tryCatchPattern":"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; }","preventionTips":["Upgrade the whole cluster before ingesting with a newer segment format","Never downgrade historicals below the writer's format version","Check segment metadata versions after upgrade"],"tags":["druid","segment-format","version-compatibility"],"backgroundTag":"unsupported-enum-value","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T20:17:13.540Z"}