{"record":{"id":"52d26e05c028c27c","repo":"apache/cassandra","slug":"is-deprecated-and-not-actively-maintained-it-w-52d26e","errorCode":null,"errorMessage":"{} is deprecated and not actively maintained. It will be removed in the next major version of Cassandra.","messagePattern":"(.+?) is deprecated and not actively maintained\\. It will be removed in the next major version of Cassandra\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/locator/CloudstackSnitch.java","lineNumber":43,"sourceCode":" * {@code country-location-availability zone} and uses the country/location\n * tuple as a datacenter and the availability zone as a rack\n *\n * This snitch is deprecated, and it is eligible for the removal in the next major release of Cassandra.\n *\n * @deprecated See CASSANDRA-18438\n */\n@Deprecated(since = \"5.0\")\npublic class CloudstackSnitch extends AbstractCloudMetadataServiceSnitch\n{\n    public CloudstackSnitch() throws IOException\n    {\n        this(new SnitchProperties(new Properties()));\n    }\n\n    public CloudstackSnitch(SnitchProperties snitchProperties) throws IOException\n    {\n        super( new CloudstackLocationProvider(snitchProperties));\n        logger.warn(\"{} is deprecated and not actively maintained. It will be removed in the next \" +\n                    \"major version of Cassandra.\", CloudstackSnitch.class.getName());\n    }\n\n    public CloudstackSnitch(AbstractCloudMetadataServiceConnector connector) throws IOException\n    {\n        super(new CloudstackLocationProvider(connector));\n        logger.warn(\"{} is deprecated and not actively maintained. It will be removed in the next \" +\n                    \"major version of Cassandra.\", CloudstackSnitch.class.getName());\n    }\n}\n","sourceCodeStart":25,"sourceCodeEnd":54,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/locator/CloudstackSnitch.java#L25-L54","documentation":"Instantiating CloudstackSnitch logs this deprecation warning: the Cloudstack snitch is not actively maintained and will be removed in the next major version. The snitch still functions (it resolves DC/rack from the Cloudstack metadata service), but Cassandra wants operators to migrate.","triggerScenarios":"new CloudstackSnitch() or new CloudstackSnitch(SnitchProperties) — typically when cassandra.yaml sets endpoint_snitch: CloudstackSnitch and the class is constructed at startup.","commonSituations":"Long-running Cloudstack deployments whose cassandra.yaml was never updated; upgrade preflight where operators ignore startup warnings.","solutions":["Switch endpoint_snitch to GossipingPropertyFileSnitch or PropertyFileSnitch and define datacenter/rack in cassandra-rackdc.properties.","Remove the deprecated class from any tooling/scripts that reference CloudstackSnitch before the major upgrade.","Restart nodes one DC at a time after changing the snitch and verify ring ownership with nodetool."],"exampleFix":"// before\nIEndpointSnitch snitch = new CloudstackSnitch(new SnitchProperties(new Properties()));\n// after\nIEndpointSnitch snitch = new GossipingPropertyFileSnitch(); // dc/rack from cassandra-rackdc.properties","handlingStrategy":"validation","validationCode":"// guard before constructing\nprivate static IEndpointSnitch safeSnitch() {\n    String configured = System.getProperty(\"cassandra.endpoint_snitch\", \"\");\n    if (configured.contains(\"Cloudstack\"))\n        logger.warn(\"CloudstackSnitch is deprecated; migrating to GossipingPropertyFileSnitch\");\n    return new GossipingPropertyFileSnitch();\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Replace CloudstackSnitch references in config and code before the next major release.","Keep dc/rack definitions in cassandra-rackdc.properties rather than cloud metadata lookups.","Grep deployments regularly for deprecated class names."],"tags":["deprecation","snitch","configuration"],"backgroundTag":"deprecated-api-usage","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"}