[
https://issues.apache.org/jira/browse/CASSANDRA-20360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Caleb Rackliffe updated CASSANDRA-20360:
----------------------------------------
Status: Ready to Commit (was: Review In Progress)
> 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
> Fix For: 5.x
>
> Attachments: ci_summary.html
>
> Time Spent: 1h 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: [email protected]
For additional commands, e-mail: [email protected]