You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "David Smiley (Jira)" <ji...@apache.org> on 2024/11/13 20:24:00 UTC

[jira] [Commented] (SOLR-17559) DocCollection should be fully immutable.

    [ https://issues.apache.org/jira/browse/SOLR-17559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17898041#comment-17898041 ] 

David Smiley commented on SOLR-17559:
-------------------------------------

If it's not too much scope creep, it'd be nice to have a simple memory optimization for when all slices are active, which is the common case.  We don't need to duplicate the activeSlices map.

> DocCollection should be fully immutable.
> ----------------------------------------
>
>                 Key: SOLR-17559
>                 URL: https://issues.apache.org/jira/browse/SOLR-17559
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud, SolrJ
>            Reporter: David Smiley
>            Priority: Minor
>              Labels: newdev
>
> DocCollection (a collection's SolrCloud state) has a number of accessors that return mutable data structures.  The worst offender is getActiveSlicesArr, returning an array.  To reduce the risk of accidental changes, any state exposure should be immutable.
> See this [comment|https://issues.apache.org/jira/browse/SOLR-12723?focusedCommentId=17897805&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17897805] for more context.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org