{"record":{"id":"dd9ce2c92a94e685","repo":"apache/druid","slug":"unknown-version-dd9ce2","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/ScalarDoubleColumnAndIndexSupplier.java","lineNumber":172,"sourceCode":"        GenericIndexed<ImmutableBitmap> rBitmaps = GenericIndexed.read(\n            valueIndexBuffer,\n            bitmapSerdeFactory.getObjectStrategy(),\n            columnBuilder.getFileMapper()\n        );\n        return new ScalarDoubleColumnAndIndexSupplier(\n            doubleDictionarySupplier,\n            encodedCol,\n            doubles,\n            rBitmaps,\n            bitmapSerdeFactory.getBitmapFactory(),\n            columnConfig\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  private final Supplier<FixedIndexed<Double>> doubleDictionarySupplier;\n\n  private final Supplier<ColumnarInts> encodedValuesSupplier;\n  private final Supplier<ColumnarDoubles> valueColumnSupplier;\n\n  private final GenericIndexed<ImmutableBitmap> valueIndexes;\n\n  private final BitmapFactory bitmapFactory;\n  private final ImmutableBitmap nullValueBitmap;\n  private final ColumnConfig columnConfig;\n\n  private ScalarDoubleColumnAndIndexSupplier(\n      Supplier<FixedIndexed<Double>> longDictionary,\n      Supplier<ColumnarInts> encodedValuesSupplier,\n      Supplier<ColumnarDoubles> valueColumnSupplier,","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/nested/ScalarDoubleColumnAndIndexSupplier.java#L154-L190","documentation":"ScalarDoubleColumnAndIndexSupplier.read() only knows how to deserialize nested double columns for the versions it was built with (V1). If the column version byte in the segment file is anything else, the supplier cannot interpret the on-disk format and throws this generic String wrapped as a RuntimeException instead of attempting a partial read.","triggerScenarios":"Reading a segment whose scalar-double nested column was written by a newer Druid version (or corrupted segment file whose version byte is garbage), typically when the segment was created with a future/patched writer and read by an older broker/historical that lacks the V2+ reader.","commonSituations":"Rolling upgrades where newer historicals wrote segments that an older process reads; downgraded cluster reading segments produced after the downgrade; corrupted segment files (bad version byte) on deep storage or local cache.","solutions":["Upgrade the Druid processes reading the segment to a version that supports the column's version byte","Re-ingest or re-serialize the affected segment with the current (reading) Druid version so the column is written in a supported version","Verify segment file integrity; if the version byte is corrupted, replace the segment from a good replica or deep-storage copy","Check the druid-processing version in all cluster nodes to ensure writer/reader compatibility"],"exampleFix":"// before: reading a V2 segment with an old reader -> Unknown version 2\n// after: upgrade the reader\n//   pom.xml (or dependency for druid-processing)\n//   <dependency>\n//     <groupId>org.apache.druid</groupId>\n//     <artifactId>druid-processing</artifactId>\n//     <version>2026.x.y</version> <!-- was 2024.x.y, lacked V2 support -->\n//   </dependency>","handlingStrategy":"try-catch","validationCode":"// Before serving a segment, check column version compatibility where the metadata exposes it:\nSegmentMetadata segMeta = getSegmentMetadata(segmentId);\nString usedVersion = segMeta.getVersion();\nif (!CLUSTER_SUPPORTED_VERSIONS.contains(usedVersion)) {\n  throw new IllegalStateException(\"Segment \" + segmentId + \" written by \" + usedVersion\n      + \" is newer than this reader supports; upgrade or re-ingest.\");\n}","typeGuard":"// Guard before use: confirm the segment came from a writer version this reader understands\nstatic boolean isReadableSegment(SegmentMetadata meta, String maxSupportedVersion) {\n  return meta != null && meta.getVersion() != null\n      && compareVersions(meta.getVersion(), maxSupportedVersion) <= 0;\n}","tryCatchPattern":"try {\n  ColumnHolder col = segment.storageAdapter().getColumnHolder(\"myDoubleCol\");\n  // use column\n} catch (RuntimeException e) {\n  if (e.getMessage() != null && e.getMessage().startsWith(\"Unknown version\")) {\n    LOG.warn(e, \"Unsupported segment format for %s; re-ingesting\", segmentId);\n    scheduler.requestReingest(segmentId);\n  } else {\n    throw e;\n  }\n}","preventionTips":["Keep all Druid nodes (historicals, brokers, middle managers) on the same or higher version than the writer that produced stored segments","Never downgrade the cluster without re-ingesting segments produced after the format change","Pin segment format versions in CI ingestion smoke tests to detect reader/writer skew early","Monitor load-time logs for version-related failures and quarantine affected segments"],"tags":["segment-deserialization","version-compatibility","druid-processing"],"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-17T15:17:12.973Z"}