{"record":{"id":"04d5a7a626f69f01","repo":"apache/druid","slug":"unknown-version-s-04d5a7","errorCode":null,"errorMessage":"Unknown version[%s]","messagePattern":"Unknown version\\[(.+?)\\]","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/segment/data/VSizeColumnarMultiInts.java","lineNumber":186,"sourceCode":"  {\n    return this;\n  }\n\n  public static VSizeColumnarMultiInts readFromByteBuffer(ByteBuffer buffer)\n  {\n    byte versionFromBuffer = buffer.get();\n\n    if (VERSION == versionFromBuffer) {\n      int numBytes = buffer.get();\n      int size = buffer.getInt();\n      ByteBuffer bufferToUse = buffer.asReadOnlyBuffer();\n      bufferToUse.limit(bufferToUse.position() + size);\n      buffer.position(bufferToUse.limit());\n\n      return new VSizeColumnarMultiInts(bufferToUse, numBytes);\n    }\n\n    throw new IAE(\"Unknown version[%s]\", versionFromBuffer);\n  }\n\n  @Override\n  public Iterator<IndexedInts> iterator()\n  {\n    return IndexedIterable.create(this).iterator();\n  }\n\n  @Override\n  public void close()\n  {\n    // no-op\n  }\n\n  @Override\n  public void inspectRuntimeShape(RuntimeShapeInspector inspector)\n  {\n    inspector.visit(\"theBuffer\", theBuffer);","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/data/VSizeColumnarMultiInts.java#L168-L204","documentation":"VSizeColumnarMultiInts.readFromByteBuffer dispatches on a leading version byte and throws IAE 'Unknown version' when it matches nothing. The buffer is not a valid serialized VSizeColumnarMultiInts — wrong format, corruption, or misaligned position.","triggerScenarios":"Deserializing a buffer whose first byte is not a supported version — reading a column written by a different format, or positioning the buffer inside the payload instead of at its start.","commonSituations":"Version-skew between writer and reader Druid versions, segment corruption on deep storage, custom tooling writing/reading columns manually.","solutions":["Confirm writer/reader Druid versions are compatible; re-ingest or upgrade","Point the buffer at the exact column start offset where the version byte lives","Validate segment checksums and re-download corrupted files","Serialize via the class's own writer so version metadata is emitted"],"exampleFix":"// before\nbuf.position(offset + HEADER_SKIP); // lands past the version byte\nVSizeColumnarMultiInts col = VSizeColumnarMultiInts.readFromByteBuffer(buf);\n// after\nbuf.position(offset);\nVSizeColumnarMultiInts col = VSizeColumnarMultiInts.readFromByteBuffer(buf);","handlingStrategy":"validation","validationCode":"if (buffer.remaining() < 1) throw new IllegalStateException(\"buffer too short\");\nbyte version = buffer.get(buffer.position());\nif (version != VSizeColumnarMultiInts.VERSION) throw new IllegalStateException(\"unsupported version \" + version);","typeGuard":"boolean isSupportedVersion(ByteBuffer buf) { return buf.remaining() >= 1 && buf.get(buf.position()) == VSizeColumnarMultiInts.VERSION; }","tryCatchPattern":"try { col = VSizeColumnarMultiInts.readFromByteBuffer(buffer); } catch (IAE e) { if (e.getMessage().startsWith(\"Unknown version\")) { /* mark segment bad, re-ingest */ } else throw e; }","preventionTips":["Deserialize at the exact column start offset","Validate segment integrity before loading columns","Keep cluster-wide Druid versions in sync"],"tags":["serialization","deserialization","segment-data"],"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"}