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

Alan Woodward updated SOLR-7570:
--------------------------------
    Attachment: SOLR-7570.patch

Here's the first cut of an idea.

* Adds a writeResource(String, byte[], Location) method to SolrResourceLoader 
(Location can be LOCAL, COLLECTION, CONFIGSET)
* SolrResourceLoader takes both a local instance dir and a shared config dir.  
These can be the same if you're not using a configset.
* The standard resource loader looks in three places for resources:
** core instance dir
** configset
** classpath
* The ZK resource loader looks in four places:
** core instance dir
** collection-specific config
** zk config
** classpath

You can write to either the local core instance dir, or to the 
collection-specific config (I added CONFIG as a location in case we want to use 
that later for things like specifying where a particular resource was found, 
but that can be taken out if it's not adding anything now).

Writing to the collection-specific config uses version-tracking to implement 
optimistic concurrency.

There are tests for the standard resource loader and the ZK resource loader.

This is still pretty rough around the edges, and I haven't run the full test 
suite or started cutting over existing code to using the new API, but it's a 
start.  What do people think?

> Config APIs should not modify the ConfigSet
> -------------------------------------------
>
>                 Key: SOLR-7570
>                 URL: https://issues.apache.org/jira/browse/SOLR-7570
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Tomás Fernández Löbbe
>         Attachments: SOLR-7570.patch
>
>
> Originally discussed here: 
> http://mail-archives.apache.org/mod_mbox/lucene-dev/201505.mbox/%3CCAMJgJxSXCHxDzJs5-C-pKFDEBQD6JbgxB=-xp7u143ekmgp...@mail.gmail.com%3E
> The ConfigSet used to create a collection should be read-only. Changes made 
> via any of the Config APIs should only be applied to the collection where the 
> operation is done and no to other collections that may be using the same 
> ConfigSet. As discussed in the dev list: 
> When a collection is created we should have two things, an immutable part 
> (the ConfigSet) and a mutable part (configoverlay, generated schema, etc). 
> The ConfigSet will still be placed in ZooKeeper under "/configs" but the 
> mutable part should be placed under "/collections/$COLLECTION_NAME/…"
> [~romseygeek] suggested: 
> {quote}
> A nice way of doing it would be to make it part of the SolrResourceLoader 
> interface.  The ZK resource loader could check in the collection-specific 
> zknode first, and then under configs/, and we could add a writeResource() 
> method that writes to the collection-specific node as well.  Then all config 
> I/O goes via the resource loader, and we have a way of keeping certain parts 
> immutable.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to