apache/cassandra · error · IllegalArgumentException
Component is not present in the manifest
Error message
Component %s is not present in the manifest
What it means
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.
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
Example fix
// before
long size = manifest.sizeOf(Component.STATS); // throws if absent
// after
if (manifest.contains(Component.STATS)) {
long size = manifest.sizeOf(Component.STATS);
} else {
// skip or request the missing component
} Defensive patterns
Strategy: try-catch
Validate before calling
if (component == null || manifest == null) throw new IllegalArgumentException("manifest/component required");
// ensure manifest covers all components: manifest.components().keySet().containsAll(expectedComponents); Type guard
boolean isKnown = c -> manifest.components().containsKey(c);
Try / catch
try { long size = manifest.sizeOf(component); } catch (IllegalArgumentException e) { /* rebuild or re-stream with full manifest */ } Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- FSWriteError (wraps IOException writing sstable component)
- Unknown sstable format
- 3
- A node required to move the data consistently is down
- A range supplied to SSTableCursorReader ends before it…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/d54b7bfc6c7af774.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/db/streaming/ComponentManifest.java:77
LinkedHashMap<Component, Long> components = new LinkedHashMap<>(streamingComponents.size());
for (Component component : streamingComponents)
{
File file = sstable.descriptor.fileFor(component);
if (!file.exists())
continue;
components.put(component, file.length());
}
return new ComponentManifest(components);
}
public long sizeOf(Component component)
{
Long size = components.get(component);
if (size == null)
throw new IllegalArgumentException("Component " + component + " is not present in the manifest");
return size;
}
public long totalSize()
{
long totalSize = 0;
for (Long size : components.values())
totalSize += size;
return totalSize;
}
public List<Component> components()
{
return new ArrayList<>(components.keySet());
}
@Override
public boolean equals(Object o)View on GitHub (pinned to 88fd0f6a0e)