{"record":{"id":"11851b2fc65c4e06","repo":"apache/druid","slug":"unknown-version-s-11851b","errorCode":null,"errorMessage":"Unknown version[%s]","messagePattern":"Unknown version\\[(.+?)\\]","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/segment/data/V3CompressedVSizeColumnarMultiIntsSupplier.java","lineNumber":80,"sourceCode":"      SegmentFileMapper mapper\n  )\n  {\n    byte versionFromBuffer = buffer.get();\n\n    if (versionFromBuffer == VERSION) {\n      CompressedColumnarIntsSupplier offsetSupplier = CompressedColumnarIntsSupplier.fromByteBuffer(\n          buffer,\n          order,\n          mapper\n      );\n      CompressedVSizeColumnarIntsSupplier valueSupplier = CompressedVSizeColumnarIntsSupplier.fromByteBuffer(\n          buffer,\n          order,\n          mapper\n      );\n      return new V3CompressedVSizeColumnarMultiIntsSupplier(offsetSupplier, valueSupplier);\n    }\n    throw new IAE(\"Unknown version[%s]\", versionFromBuffer);\n  }\n\n  @VisibleForTesting\n  public static V3CompressedVSizeColumnarMultiIntsSupplier fromIterable(\n      final Iterable<IndexedInts> objectsIterable,\n      final int offsetChunkFactor,\n      final int maxValue,\n      final ByteOrder byteOrder,\n      final CompressionStrategy compression,\n      final Closer closer\n  )\n  {\n    Iterator<IndexedInts> objects = objectsIterable.iterator();\n    IntArrayList offsetList = new IntArrayList();\n    IntArrayList values = new IntArrayList();\n\n    int offset = 0;\n    while (objects.hasNext()) {","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/data/V3CompressedVSizeColumnarMultiIntsSupplier.java#L62-L98","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify the segment file was written by a Druid version that supports V3 compressed multi-value columns and re-ingest or upgrade the reader","Check the buffer alignment/position — ensure the ByteBuffer is positioned at the start of the column payload, not offset into it","Validate segment integrity (checksums) and re-download/rebuild the segment from deep storage","If writing custom serialization, call fromIterable/toBytes with the supported version instead of hand-crafting buffers"],"exampleFix":"// before: hand-positioned buffer\nByteBuffer buf = fileBuffer.slice(); buf.position(100);\nV3CompressedVSizeColumnarMultiIntsSupplier sup = V3CompressedVSizeColumnarMultiIntsSupplier.fromByteBuffer(buf, ByteOrder.LITTLE_ENDIAN, mapper);\n// after: use the column's stated offset\nByteBuffer buf = fileBuffer.slice(); buf.position(columnOffset); buf.order(ByteOrder.LITTLE_ENDIAN);\nV3CompressedVSizeColumnarMultiIntsSupplier sup = V3CompressedVSizeColumnarMultiIntsSupplier.fromByteBuffer(buf, ByteOrder.LITTLE_ENDIAN, mapper);","handlingStrategy":"validation","validationCode":"if (buffer.remaining() < 1) throw new IllegalStateException(\"buffer too short\");\nbyte version = buffer.get(buffer.position());\nif (version != V3CompressedVSizeColumnarMultiIntsSupplier.VERSION) throw new IllegalStateException(\"unsupported column version: \" + version);","typeGuard":"boolean isSupportedVersion(ByteBuffer buf) { return buf.remaining() >= 1 && buf.get(buf.position()) == V3CompressedVSizeColumnarMultiIntsSupplier.VERSION; }","tryCatchPattern":"try { supplier = V3CompressedVSizeColumnarMultiIntsSupplier.fromByteBuffer(buf, order, mapper); } catch (IAE e) { if (e.getMessage().startsWith(\"Unknown version\")) { /* quarantine segment, re-ingest */ } else throw e; }","preventionTips":["Always read columns at their declared offsets, never slice mid-payload","Keep writer and reader Druid versions aligned within a cluster","Verify segment checksums before deserialization"],"tags":["serialization","segment-data","deserialization"],"backgroundTag":"invalid-argument-format","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"}