{"record":{"id":"1b146a79f7776365","repo":"apache/druid","slug":"unknown-version","errorCode":null,"errorMessage":"Unknown version ","messagePattern":"Unknown version ","errorType":"exception","errorClass":"RE","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/segment/nested/NestedDataColumnSupplier.java","lineNumber":194,"sourceCode":"            fieldInfo,\n            compressedRawColumnSupplier,\n            nullValues,\n            stringDictionarySupplier,\n            longDictionarySupplier,\n            doubleDictionarySupplier,\n            arrayDictionarySupplier,\n            columnConfig,\n            mapper,\n            formatSpec,\n            byteOrder,\n            logicalType\n        );\n      }\n      catch (IOException ex) {\n        throw new RE(ex, \"Failed to deserialize V%s column.\", version);\n      }\n    } else {\n      throw new RE(\"Unknown version \" + version);\n    }\n  }\n\n\n  /**\n   * Detects if field dictionary contains any invalid entries from a bug which previously existed in\n   * {@link NestedPathFinder#toNormalizedJsonPath(List)} to generate invalid path expressions when faced with empty\n   * field names - for example {\"\":{\"a\":1}} would incorrectly store the path as $..a instead of $[''].a.\n   * <p>\n   * If this method detects any illegal paths, the field dictionary is wrapped using {@link FieldsFixupIndexed}, which\n   * replaces the invalid values with corrected values, using {@link NestedPathFinder#parseBadJsonPath(String)} and\n   * feeding that back into the now fixed {@link NestedPathFinder#toNormalizedJsonPath(List)}.\n   * <p>\n   * Columns written after the bug was fixed will store {@link NestedCommonFormatColumnPartSerde#pathParserVersion} as\n   * 0x01 or greater, to indicate that we do not need to call this method to check for fixing up paths.\n   * <p>\n   * see https://github.com/apache/druid/pull/19072 for additional details.\n   */","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/nested/NestedDataColumnSupplier.java#L176-L212","documentation":"NestedDataColumnSupplier.read() reads the column's version byte and supports only the known versions (e.g. V1-V4). Any other version byte yields RE 'Unknown version <n>'. This typically means the segment was written by a newer Druid than the one reading it, or the file is corrupt.","triggerScenarios":"Opening a nested column whose first version byte is not one of the recognized NestedDataColumnSupplier versions; corrupted column header bytes.","commonSituations":"Downgraded Druid cluster reading segments written by a newer release; segments produced by a fork/patched build; corrupted cache files.","solutions":["Upgrade Druid to at least the version that wrote the segment (check segment 'version' metadata in segments table).","Re-ingest the data with the current Druid version to produce a compatible column.","Restore the correct segment from deep storage if cache corruption is suspected.","Avoid downgrading a cluster that has already written segments in a newer column format."],"exampleFix":"// before: reader older than writer\n// RE: Unknown version 5\n// after: upgrade all Druid services to the writer's version, or re-ingest with: \n// \"granularitySpec\": ... // re-run ingestion on supported version","handlingStrategy":"type-guard","validationCode":"// peek the version byte before opening the supplier\ndata.mark(); byte version = data.get(); data.reset();\nif (version != SUPPORTED_VERSION) { /* route to matching supplier or fail fast */ }","typeGuard":"boolean isKnownVersion(byte v) { return v == 1 || v == 2 || v == 3 || v == 4; }","tryCatchPattern":"try {\n  col = supplier.get();\n} catch (RE e) {\n  if (e.getMessage().startsWith(\"Unknown version\")) {\n    throw new SegmentIncompatibleException(e, \"Upgrade Druid to read this segment\");\n  } throw e;\n}","preventionTips":["Check writer/reader version compatibility before serving segments","Never downgrade a cluster after ingesting with newer formats","Track segment versions in your monitoring"],"tags":["druid","segment","version","backward-compatibility"],"backgroundTag":"incompatible-source-type","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}