apache/druid · error · IllegalArgumentException

Unknown version[ ]

Error message

Unknown version[%s]

What it means

V3CompressedVSizeColumnarMultiIntsSupplier.fromByteBuffer reads a version byte from the serialized buffer and dispatches to the matching decoder. This error means the buffer's version byte does not match any supported version (only V3 is supported here), so the data cannot be deserialized. It almost always indicates corrupted, truncated, or foreign-format segment data rather than a caller bug.

Solutions

  1. Verify the segment file was written by a Druid version that supports V3 compressed multi-value columns and re-ingest or upgrade the reader
  2. Check the buffer alignment/position — ensure the ByteBuffer is positioned at the start of the column payload, not offset into it
  3. Validate segment integrity (checksums) and re-download/rebuild the segment from deep storage
  4. If writing custom serialization, call fromIterable/toBytes with the supported version instead of hand-crafting buffers

Example fix

// before: hand-positioned buffer
ByteBuffer buf = fileBuffer.slice(); buf.position(100);
V3CompressedVSizeColumnarMultiIntsSupplier sup = V3CompressedVSizeColumnarMultiIntsSupplier.fromByteBuffer(buf, ByteOrder.LITTLE_ENDIAN, mapper);
// after: use the column's stated offset
ByteBuffer buf = fileBuffer.slice(); buf.position(columnOffset); buf.order(ByteOrder.LITTLE_ENDIAN);
V3CompressedVSizeColumnarMultiIntsSupplier sup = V3CompressedVSizeColumnarMultiIntsSupplier.fromByteBuffer(buf, ByteOrder.LITTLE_ENDIAN, mapper);
Defensive patterns

Strategy: validation

Validate before calling

if (buffer.remaining() < 1) throw new IllegalStateException("buffer too short");
byte version = buffer.get(buffer.position());
if (version != V3CompressedVSizeColumnarMultiIntsSupplier.VERSION) throw new IllegalStateException("unsupported column version: " + version);

Type guard

boolean isSupportedVersion(ByteBuffer buf) { return buf.remaining() >= 1 && buf.get(buf.position()) == V3CompressedVSizeColumnarMultiIntsSupplier.VERSION; }

Try / catch

try { supplier = V3CompressedVSizeColumnarMultiIntsSupplier.fromByteBuffer(buf, order, mapper); } catch (IAE e) { if (e.getMessage().startsWith("Unknown version")) { /* quarantine segment, re-ingest */ } else throw e; }

Prevention

When it happens

Trigger: Calling fromByteBuffer (directly or via column deserialization) on a ByteBuffer whose first byte is not the expected V3 version identifier — e.g. data written by a different/older column format, or a misaligned buffer that reads a non-version byte as the version.

Common situations: Reading segment files from a Druid version incompatible with the reader, copying columns across formats, hand-rolled segment tooling that misaligns the buffer, or corrupted segment files on deep storage.

Understand the failure class

Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.

Related errors


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

Appendix: source

Thrown at processing/src/main/java/org/apache/druid/segment/data/V3CompressedVSizeColumnarMultiIntsSupplier.java:80

      SegmentFileMapper mapper
  )
  {
    byte versionFromBuffer = buffer.get();

    if (versionFromBuffer == VERSION) {
      CompressedColumnarIntsSupplier offsetSupplier = CompressedColumnarIntsSupplier.fromByteBuffer(
          buffer,
          order,
          mapper
      );
      CompressedVSizeColumnarIntsSupplier valueSupplier = CompressedVSizeColumnarIntsSupplier.fromByteBuffer(
          buffer,
          order,
          mapper
      );
      return new V3CompressedVSizeColumnarMultiIntsSupplier(offsetSupplier, valueSupplier);
    }
    throw new IAE("Unknown version[%s]", versionFromBuffer);
  }

  @VisibleForTesting
  public static V3CompressedVSizeColumnarMultiIntsSupplier fromIterable(
      final Iterable<IndexedInts> objectsIterable,
      final int offsetChunkFactor,
      final int maxValue,
      final ByteOrder byteOrder,
      final CompressionStrategy compression,
      final Closer closer
  )
  {
    Iterator<IndexedInts> objects = objectsIterable.iterator();
    IntArrayList offsetList = new IntArrayList();
    IntArrayList values = new IntArrayList();

    int offset = 0;
    while (objects.hasNext()) {

View on GitHub (pinned to 9b90983fd2)