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

Unknown version

Error message

Unknown version 

What it means

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.

Solutions

  1. Upgrade the Druid processes reading the segment to a version that supports the column's version byte
  2. Re-ingest or re-serialize the affected segment with the current (reading) Druid version so the column is written in a supported version
  3. Verify segment file integrity; if the version byte is corrupted, replace the segment from a good replica or deep-storage copy
  4. Check the druid-processing version in all cluster nodes to ensure writer/reader compatibility

Example fix

// before: reading a V2 segment with an old reader -> Unknown version 2
// after: upgrade the reader
//   pom.xml (or dependency for druid-processing)
//   <dependency>
//     <groupId>org.apache.druid</groupId>
//     <artifactId>druid-processing</artifactId>
//     <version>2026.x.y</version> <!-- was 2024.x.y, lacked V2 support -->
//   </dependency>
Defensive patterns

Strategy: try-catch

Validate before calling

// Before serving a segment, check column version compatibility where the metadata exposes it:
SegmentMetadata segMeta = getSegmentMetadata(segmentId);
String usedVersion = segMeta.getVersion();
if (!CLUSTER_SUPPORTED_VERSIONS.contains(usedVersion)) {
  throw new IllegalStateException("Segment " + segmentId + " written by " + usedVersion
      + " is newer than this reader supports; upgrade or re-ingest.");
}

Type guard

// Guard before use: confirm the segment came from a writer version this reader understands
static boolean isReadableSegment(SegmentMetadata meta, String maxSupportedVersion) {
  return meta != null && meta.getVersion() != null
      && compareVersions(meta.getVersion(), maxSupportedVersion) <= 0;
}

Try / catch

try {
  ColumnHolder col = segment.storageAdapter().getColumnHolder("myDoubleCol");
  // use column
} catch (RuntimeException e) {
  if (e.getMessage() != null && e.getMessage().startsWith("Unknown version")) {
    LOG.warn(e, "Unsupported segment format for %s; re-ingesting", segmentId);
    scheduler.requestReingest(segmentId);
  } else {
    throw e;
  }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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

Appendix: source

Thrown at processing/src/main/java/org/apache/druid/segment/nested/ScalarDoubleColumnAndIndexSupplier.java:172

        GenericIndexed<ImmutableBitmap> rBitmaps = GenericIndexed.read(
            valueIndexBuffer,
            bitmapSerdeFactory.getObjectStrategy(),
            columnBuilder.getFileMapper()
        );
        return new ScalarDoubleColumnAndIndexSupplier(
            doubleDictionarySupplier,
            encodedCol,
            doubles,
            rBitmaps,
            bitmapSerdeFactory.getBitmapFactory(),
            columnConfig
        );
      }
      catch (IOException ex) {
        throw new RE(ex, "Failed to deserialize V%s column.", version);
      }
    } else {
      throw new RE("Unknown version " + version);
    }
  }

  private final Supplier<FixedIndexed<Double>> doubleDictionarySupplier;

  private final Supplier<ColumnarInts> encodedValuesSupplier;
  private final Supplier<ColumnarDoubles> valueColumnSupplier;

  private final GenericIndexed<ImmutableBitmap> valueIndexes;

  private final BitmapFactory bitmapFactory;
  private final ImmutableBitmap nullValueBitmap;
  private final ColumnConfig columnConfig;

  private ScalarDoubleColumnAndIndexSupplier(
      Supplier<FixedIndexed<Double>> longDictionary,
      Supplier<ColumnarInts> encodedValuesSupplier,
      Supplier<ColumnarDoubles> valueColumnSupplier,

View on GitHub (pinned to 9b90983fd2)