{"record":{"id":"2d42427f7a146c39","repo":"apache/cassandra","slug":"storage-attached-index-is-no-longer-queryable-ple","errorCode":null,"errorMessage":"Storage-attached index is no longer queryable. Please restart this node to repair it.","messagePattern":"Storage-attached index is no longer queryable\\. Please restart this node to repair it\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/index/sai/StorageAttachedIndex.java","lineNumber":802,"sourceCode":"\n    /**\n     * @return the total memory usage (in bytes) of per-column index on-disk data structure\n     */\n    public long indexFileCacheSize()\n    {\n        return view().getIndexes()\n                     .stream()\n                     .mapToLong(SSTableIndex::indexFileCacheSize)\n                     .sum();\n    }\n\n    /**\n     * Removes this index from the {@code SecondaryIndexManager}'s set of queryable indexes.\n     */\n    public void makeIndexNonQueryable()\n    {\n        baseCfs.indexManager.makeIndexNonQueryable(this, Status.BUILD_FAILED);\n        logger.warn(indexIdentifier.logMessage(\"Storage-attached index is no longer queryable. Please restart this node to repair it.\"));\n    }\n\n    /**\n     * Validate maximum term size for given row\n     */\n    public void validateTermSizeForRow(DecoratedKey key, Row row, boolean isClientMutation, ClientState state)\n    {\n        AbstractAnalyzer analyzer = hasAnalyzer() ? analyzer() : null;\n        if (indexTermType.isNonFrozenCollection())\n        {\n            Iterator<ByteBuffer> bufferIterator = indexTermType.valuesOf(row, FBUtilities.nowInSeconds());\n            while (bufferIterator != null && bufferIterator.hasNext())\n                validateTermSizeForCell(analyzer, key, bufferIterator.next(), isClientMutation, state);\n        }\n        else if (indexTermType.isFrozenCollection() && indexTermType.indexTargetType() != IndexTarget.Type.FULL)\n        {\n            Iterator<ByteBuffer> bufferIterator = indexTermType.valuesOfFrozenCollection(row, FBUtilities.nowInSeconds());\n            while (bufferIterator != null && bufferIterator.hasNext())","sourceCodeStart":784,"sourceCodeEnd":820,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/index/sai/StorageAttachedIndex.java#L784-L820","documentation":"makeIndexNonQueryable removes a StorageAttachedIndex from the SecondaryIndexManager's queryable set, marks it BUILD_FAILED, and logs this WARN. Afterwards queries will not use the index and will fall back (or error if the query requires the index), and a node restart is required to rebuild and restore the index to a queryable state.","triggerScenarios":"Runtime failure of the index — e.g. an SAI SSTable component becoming unreadable during query or flush, a ValidationException while loading per-SSTable index contexts, or corruption detected by SAI at query time that disqualifies the whole index.","commonSituations":"Disk corruption of .sc SAI component files; interrupted compaction leaving inconsistent SAI components; OOM or I/O errors during index segment reads; nodes with multiple data directories hitting known vector index issues.","solutions":["Restart the node as the message says — startup rebuilds/reloads SAI components and re-marks the index buildable.","Inspect earlier log lines for the triggering exception to address the root cause (disk errors, format mismatch).","If restart does not restore it, run nodetool rebuild_index to force a full rebuild of the SAI index.","Until repaired, avoid queries that require the index or expect fallback scans."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Plan restart/rebuild procedures for nodes running SAI indexes.","Monitor SAI component I/O errors early; they precede makeIndexNonQueryable.","Keep a runbook: restart node, then nodetool rebuild_index if the index stays BUILD_FAILED.","Avoid unclean shutdowns which can corrupt SAI segment files."],"tags":["sai","index","queryability","restart-required"],"backgroundTag":"invalid-state-transition","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}