{"record":{"id":"a9b2190a6687abc2","repo":"apache/druid","slug":"failed-to-deserialize-v-s-column","errorCode":null,"errorMessage":"Failed to deserialize V%s column.","messagePattern":"Failed to deserialize V(.+?) column\\.","errorType":"exception","errorClass":"RE","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/segment/nested/NestedDataColumnSupplier.java","lineNumber":191,"sourceCode":"        return new NestedDataColumnSupplier(\n            columnName,\n            fieldsSupplier,\n            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.","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/nested/NestedDataColumnSupplier.java#L173-L209","documentation":"NestedDataColumnSupplier.read() deserializes a nested (auto) column's serialized state. When the underlying read throws an IOException, it is wrapped in a Druid RE with 'Failed to deserialize V<version> column.', indicating the on-disk column bytes could not be parsed for that column format version.","triggerScenarios":"Calling NestedDataColumnSupplier.get() on a column file whose payload is truncated, corrupted, or written in a form incompatible with the current reader despite a recognized version byte.","commonSituations":"Truncated segment files from failed deep-storage downloads or interrupted segment pushes; bit-rot on local segment cache disks; reading segments copied between clusters incompletely.","solutions":["Delete the corrupted segment from the local cache (or the whole cache dir) so it is re-downloaded.","Re-download/restore the segment from deep storage; verify checksums.","Re-ingest the affected data to rebuild the column.","Check disk health and deep-storage connectivity if corruption recurs."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// verify the column payload is present and plausibly sized before reading\njava.io.File colFile = new File(segmentDir, columnName + \"/\" + versionFile);\nif (!colFile.exists() || colFile.length() < MIN_HEADER_BYTES) {\n  throw new CorruptSegmentException(columnName);\n}","typeGuard":null,"tryCatchPattern":"try {\n  col = supplier.get();\n} catch (RE e) {\n  if (e.getMessage().startsWith(\"Failed to deserialize\")) {\n    log.error(e, \"Corrupt/truncated nested column %s; evict cache entry and re-download\", columnName);\n    cacheEvictor.evict(segmentId);\n  } else throw e;\n}","preventionTips":["Monitor segment cache for truncated files; evict on failure","Validate deep-storage downloads before use","Re-ingest segments showing repeated deserialization failures"],"tags":["druid","segment","deserialization","io"],"backgroundTag":"file-read-failed","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"}