{"record":{"id":"d54b7bfc6c7af774","repo":"apache/cassandra","slug":"component-s-is-not-present-in-the-manifest","errorCode":null,"errorMessage":"Component %s is not present in the manifest","messagePattern":"Component (.+?) is not present in the manifest","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/streaming/ComponentManifest.java","lineNumber":77,"sourceCode":"        LinkedHashMap<Component, Long> components = new LinkedHashMap<>(streamingComponents.size());\n\n        for (Component component : streamingComponents)\n        {\n            File file = sstable.descriptor.fileFor(component);\n            if (!file.exists())\n                continue;\n\n            components.put(component, file.length());\n        }\n\n        return new ComponentManifest(components);\n    }\n\n    public long sizeOf(Component component)\n    {\n        Long size = components.get(component);\n        if (size == null)\n            throw new IllegalArgumentException(\"Component \" + component + \" is not present in the manifest\");\n        return size;\n    }\n\n    public long totalSize()\n    {\n        long totalSize = 0;\n        for (Long size : components.values())\n            totalSize += size;\n        return totalSize;\n    }\n\n    public List<Component> components()\n    {\n        return new ArrayList<>(components.keySet());\n    }\n\n    @Override\n    public boolean equals(Object o)","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/streaming/ComponentManifest.java#L59-L95","documentation":"ComponentManifest.sizeOf looks up the on-disk size of a single SSTable component (DATA, INDEX, etc.) during streaming. If the requested component is absent from the manifest map, the manifest and the actual file set are inconsistent, so Cassandra throws IllegalArgumentException rather than guessing a size. This guards stream receivers against truncated or malformed manifests.","triggerScenarios":"Calling sizeOf(Component) with a component that was never registered in the manifest, e.g. streaming a manifest built for a subset of components while the sender tries to size every component of the SSTable (or a sender/receiver version mismatch causes different component sets).","commonSituations":"Streaming SSTables between nodes running mismatched Cassandra versions where component sets differ (e.g. newer components like first-index or stats added in later versions); hand-crafted or corrupted stream manifests in testing; custom storage plugins that drop components.","solutions":["Ensure both nodes run compatible Cassandra versions and the same component set is produced and sent","Verify the ComponentManifest is built with all components of the SSTable before streaming (manifest must be a superset of queried components)","Regenerate/rebuild the SSTables (e.g. scrub or re-stream) if the manifest is corrupted","Check for custom stream handlers or ISSTableBuilder code that filters components"],"exampleFix":"// before\nlong size = manifest.sizeOf(Component.STATS); // throws if absent\n// after\nif (manifest.contains(Component.STATS)) {\n    long size = manifest.sizeOf(Component.STATS);\n} else {\n    // skip or request the missing component\n}","handlingStrategy":"try-catch","validationCode":"if (component == null || manifest == null) throw new IllegalArgumentException(\"manifest/component required\");\n// ensure manifest covers all components: manifest.components().keySet().containsAll(expectedComponents);","typeGuard":"boolean isKnown = c -> manifest.components().containsKey(c);","tryCatchPattern":"try { long size = manifest.sizeOf(component); } catch (IllegalArgumentException e) { /* rebuild or re-stream with full manifest */ }","preventionTips":["Keep sender/receiver Cassandra versions aligned during streaming","Always build the manifest from the full descriptor component list","Log and diff manifest components when streaming fails"],"tags":["streaming","sstable","manifest","illegal-argument"],"backgroundTag":"resource-not-found","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}