{"record":{"id":"ab0538b4f39df62a","repo":"apache/druid","slug":"unknown-version-s-ab0538","errorCode":null,"errorMessage":"Unknown version[%s]","messagePattern":"Unknown version\\[(.+?)\\]","errorType":"exception","errorClass":"IAE","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/segment/data/CompressedColumnarIntsSupplier.java","lineNumber":137,"sourceCode":"      ByteOrder order,\n      SegmentFileMapper mapper\n  )\n  {\n    byte versionFromBuffer = buffer.get();\n\n    if (versionFromBuffer == VERSION) {\n      final int totalSize = buffer.getInt();\n      final int sizePer = buffer.getInt();\n      final CompressionStrategy compression = CompressionStrategy.forId(buffer.get());\n      return new CompressedColumnarIntsSupplier(\n          totalSize,\n          sizePer,\n          GenericIndexed.read(buffer, DecompressingByteBufferObjectStrategy.of(order, compression), mapper),\n          compression\n      );\n    }\n\n    throw new IAE(\"Unknown version[%s]\", versionFromBuffer);\n  }\n\n  @VisibleForTesting\n  static CompressedColumnarIntsSupplier fromIntBuffer(\n      final IntBuffer buffer,\n      final int chunkFactor,\n      final ByteOrder byteOrder,\n      final CompressionStrategy compression,\n      final Closer closer\n  )\n  {\n    Preconditions.checkArgument(\n        chunkFactor <= MAX_INTS_IN_BUFFER, \"Chunks must be <= 64k bytes. chunkFactor was[%s]\", chunkFactor\n    );\n\n    return new CompressedColumnarIntsSupplier(\n        buffer.remaining(),\n        chunkFactor,","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/data/CompressedColumnarIntsSupplier.java#L119-L155","documentation":"CompressedColumnarIntsSupplier.fromByteBuffer dispatches on a version byte read from the serialized buffer and throws IllegalArgumentException when the version is unrecognized. It indicates the bytes are not a valid/known-version CompressedColumnarIntsSupplier payload.","triggerScenarios":"Reading a compressed int column whose header version byte is not one of the supported versions - corrupt file, wrong buffer offset, or a segment written by an incompatible Druid version (older/newer format).","commonSituations":"Cross-version segment compatibility issues after Druid upgrade/downgrade; corrupted deep-storage files; mis-sliced ByteBuffers in custom segment-reading tools.","solutions":["Use a Druid binary compatible with the segment's format version (check the segment metadata / writer version).","Rebuild the segment from raw data with the current Druid version.","Verify the buffer is positioned at the exact start of the column payload (first byte must be the version).","Validate segment file integrity (re-download from deep storage)."],"exampleFix":"// before: reading segment files from an old cluster directly\n// after: re-index old segments\n// bin/druid index --spec reindex-spec.json  (re-serializes with current format)","handlingStrategy":"validation","validationCode":"// Java\nint version = buf.get(buf.position());\nif (!SUPPORTED_INTS_VERSIONS.contains(version)) {\n  throw new IllegalArgumentException(\"Unsupported column format version \" + version);\n}","typeGuard":null,"tryCatchPattern":"try {\n  return CompressedColumnarIntsSupplier.fromByteBuffer(buf, order, chunkFactor, mapper);\n} catch (IllegalArgumentException e) {\n  throw new SegmentSerializationException(\"Incompatible/corrupt segment column\", e);\n}","preventionTips":["Match historical node versions to the ingestion cluster.","Re-index legacy segments after major version upgrades.","Slice buffers from recorded column offsets, not estimates."],"tags":["segment-format","version-mismatch","deserialization"],"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-17T20:17:13.540Z"}