You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Mansi Khara (Jira)" <ji...@apache.org> on 2026/09/28 20:50:00 UTC

[jira] [Created] (CASSANALYTICS-202) Opening one keyspace instance rebuilds every keyspace instance in the Cassandra 6.0 bridge

Mansi Khara created CASSANALYTICS-202:
-----------------------------------------

             Summary: Opening one keyspace instance rebuilds every keyspace instance in the Cassandra 6.0 bridge
                 Key: CASSANALYTICS-202
                 URL: https://issues.apache.org/jira/browse/CASSANALYTICS-202
             Project: Apache Cassandra Analytics
          Issue Type: Task
            Reporter: Mansi Khara
            Assignee: Mansi Khara


AbstractSchemaBuilder created a missing keyspace instance by calling SchemaUpdater.openKeyspaceInstances(), which diffs against DistributedSchema.empty(). Every keyspace then looks newly created and all are rebuilt, so each one that already has an instance constructs its KeyspaceMetrics again and every re-registered metric makes Dropwizard's MetricRegistry.register throw IllegalArgumentException. Filling in those stack traces is the real cost, and it scales with the number of keyspaces the process has seen. Production is unaffected, since a bulk job uses one keyspace and builds its schema once, but tests open many: DataTypeTests slowed down through the class until the 6.0 CI step exceeded its deadline. openKeyspaceInstances() is replaced by openKeyspaceInstance(String), which diffs against the current keyspaces minus the one being opened, so exactly one instance is built and no metric is registered twice. That also keeps the keyspace out of diff().altered, which is what removeTables relies on to avoid Keyspace.dropCf initializing CompactionManager in client mode, so the CDC caller passes keyspaceMetadata.name and the blunt method is removed. DataTypeTests on 6.0 goes from not completing to about ten minutes.   



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org