{"record":{"id":"3a64ead18e27e4d9","repo":"apache/cassandra","slug":"the-node-does-not-have-keyspace-yet-probably-st","errorCode":null,"errorMessage":"The node does not have {keyspace} yet, probably still bootstrapping. Effective ownership information is meaningless.","messagePattern":"The node does not have (.+?) yet, probably still bootstrapping\\. Effective ownership information is meaningless\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":4293,"sourceCode":"            if (userKeyspaces.size() > 0)\n            {\n                keyspace = userKeyspaces.iterator().next();\n                AbstractReplicationStrategy replicationStrategy = Schema.instance.getKeyspaceInstance(keyspace).getReplicationStrategy();\n                for (String keyspaceName : userKeyspaces)\n                {\n                    if (!Schema.instance.getKeyspaceInstance(keyspaceName).getReplicationStrategy().hasSameSettings(replicationStrategy))\n                        throw new IllegalStateException(\"Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless\");\n                }\n            }\n\n            if (keyspace == null)\n            {\n                keyspace = \"system_traces\";\n            }\n\n            Keyspace keyspaceInstance = Schema.instance.getKeyspaceInstance(keyspace);\n            if (keyspaceInstance == null)\n                throw new IllegalStateException(\"The node does not have \" + keyspace + \" yet, probably still bootstrapping. Effective ownership information is meaningless.\");\n            replicationParams = keyspaceInstance.getMetadata().params.replication;\n            strategy = keyspaceInstance.getReplicationStrategy();\n        }\n\n        if (replicationParams.isMeta())\n        {\n            LinkedHashMap<InetAddressAndPort, Float> ownership = Maps.newLinkedHashMap();\n            metadata.placement(replicationParams).writes.byEndpoint().flattenValues().forEach((r) -> {\n                ownership.put(r.endpoint(), 1.0f);\n            });\n            return ownership;\n        }\n\n        Collection<Collection<InetAddressAndPort>> endpointsGroupedByDc = new ArrayList<>();\n        // mapping of dc's to nodes, use sorted map so that we get dcs sorted\n        SortedMap<String, Collection<InetAddressAndPort>> sortedDcsToEndpoints = new TreeMap<>(ClusterMetadata.current().directory.allDatacenterEndpoints().asMap());\n        for (Collection<InetAddressAndPort> endpoints : sortedDcsToEndpoints.values())\n            endpointsGroupedByDc.add(endpoints);","sourceCodeStart":4275,"sourceCodeEnd":4311,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L4275-L4311","documentation":"When resolving the effective-ownership keyspace via the Keyspace instance (Schema.instance.getKeyspaceInstance), a null instance means this node has not loaded the keyspace's schema/data yet - typically because the node is still bootstrapping. Ownership math would be meaningless, so an IllegalStateException is thrown.","triggerScenarios":"Calling describeOwnership/effectiveOwnership (e.g. `nodetool ownership`) on a node that is still bootstrapping or hasn't received the keyspace's schema yet.","commonSituations":"Running ownership checks on a freshly added node mid-bootstrap; new DC build where the keyspace isn't replicated to that DC yet; schema propagation delay after keyspace creation.","solutions":["Wait until bootstrap completes ('Node ... state jump to normal') and retry","Retry after schema agreement is reached (`nodetool describecluster` / schema versions match)","Ensure the keyspace's replication actually targets this node's datacenter","Run the ownership query from an established, joined node"],"exampleFix":"// before: query during bootstrap -> fails\nnodetool ownership my_ks\n// after: wait for join, then query\nnodetool netstats  # confirm bootstrap done\nnodetool ownership my_ks","handlingStrategy":"retry","validationCode":"StorageServiceMBean ss = ...;\nif (!ss.getOperationMode().equals(\"NORMAL\")) throw new IllegalStateException(\"node still bootstrapping; retry later\");\n// plus: confirm schema contains the keyspace before querying","typeGuard":null,"tryCatchPattern":"try { ss.effectiveOwnership(ks); } catch (IllegalStateException e) { if (e.getMessage().contains(\"still bootstrapping\")) { awaitOperationModeNormal(timeout); return ss.effectiveOwnership(ks); } throw e; }","preventionTips":["Gate ownership queries on operation mode NORMAL","Check schema agreement after creating new keyspaces","Run ownership reports from established nodes, not fresh bootstraps"],"tags":["bootstrap","schema","ownership"],"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"}