You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Abe Ratnofsky (Jira)" <ji...@apache.org> on 2025/02/23 16:35:00 UTC

[jira] [Updated] (CASSANDRA-20360) Improve performance of DistributedSchema.validate for large schemas

     [ https://issues.apache.org/jira/browse/CASSANDRA-20360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Abe Ratnofsky updated CASSANDRA-20360:
--------------------------------------
    Test and Documentation Plan: Unit tests and benchmarks
                         Status: Patch Available  (was: Open)

[https://github.com/apache/cassandra/pull/3926]

> Improve performance of DistributedSchema.validate for large schemas
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-20360
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20360
>             Project: Apache Cassandra
>          Issue Type: Improvement
>          Components: Transactional Cluster Metadata
>            Reporter: Abe Ratnofsky
>            Assignee: Abe Ratnofsky
>            Priority: Normal
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently DistributedSchema validates on every instantiation: [https://github.com/apache/cassandra/blob/486a6276034df40f8ac0ec9bd1d1f727b39f62c7/src/java/org/apache/cassandra/schema/DistributedSchema.java#L405]
>  
> Keyspaces.forEach delegates to AbstractBTreeMap.values, which copies the array: [https://github.com/apache/cassandra/blob/486a6276034df40f8ac0ec9bd1d1f727b39f62c7/src/java/org/apache/cassandra/utils/btree/AbstractBTreeMap.java#L109]
>  
> This can be fixed by having AbstractBTreeMap.values return a view instead of a copy. Patch is available, preparing to push.



--
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