[
https://issues.apache.org/jira/browse/CASSANALYTICS-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Saranya Krishnakumar updated CASSANALYTICS-202:
-----------------------------------------------
Reviewers: Bernardo Botella, Saranya Krishnakumar, Yifan Cai
Status: Review In Progress (was: Patch Available)
> 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
> Components: Reader
> Reporter: Mansi Khara
> Assignee: Mansi Khara
> Priority: Normal
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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: [email protected]
For additional commands, e-mail: [email protected]