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

Caleb Rackliffe updated CASSANDRA-20360:
----------------------------------------
          Fix Version/s: 5.1
                             (was: 5.x)
    Source Control Link: 
https://github.com/apache/cassandra/commit/f1bec5d0c5dccce4128b3ff9bc087cdf0577f2b0
             Resolution: Fixed
                 Status: Resolved  (was: Ready to Commit)

Committed as 
https://github.com/apache/cassandra/commit/f1bec5d0c5dccce4128b3ff9bc087cdf0577f2b0

Thanks for the patch!

> 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.1
>
>         Attachments: ci_summary.html
>
>          Time Spent: 1.5h
>  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]

Reply via email to