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

Alan Woodward updated SOLR-5172:
--------------------------------

    Attachment: SOLR-5172.patch

New patch.

* EmbeddedZkServer now has two implementations, Standalone and Ensemble.
* Ensemble deals with myid files before calling into ZK, so we don't need to 
duplicated code from the ZK source.
* Embedded server startup is moved from ZkController (ie after the 
CoreContainer is started) to SolrDispatchFilter.
* bootstrap_confdir logic moved to SolrDispatchFilter
* bootstrap_conf logic moved to ZkController.

In order to allow an embedded ensemble to be started up and bootstrapped, 
ZkController now waits for a specific node (/upload-complete) to be created in 
ZK before it starts up.  This means you can do the following:
* start two solr instances (server1 and server2) with 
--zkRun=server1,server2,server3.  They will start up their embedded ZK servers 
and then block waiting for a quorum
* start a third instance on server3 with zkRun and bootstrap_confdir.  This 
will join the quorum
* the two initial instances will now block waiting for the upload-complete node
* server3 loads its config, and creates the upload-complete node
* all three servers can now load their corecontainers.

This is a backwards-breaking change, ie after this patch, Solr won't start with 
an old ZK instance because the upload-complete node won't be there.  I'd like 
to add an -upgrade task to ZkCli to deal with that, which can be run as a 
one-off process when upgrading.

> Start embedded zk servers before CoreContainer loads
> ----------------------------------------------------
>
>                 Key: SOLR-5172
>                 URL: https://issues.apache.org/jira/browse/SOLR-5172
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Alan Woodward
>            Priority: Minor
>         Attachments: SOLR-5172.patch, SOLR-5172.patch
>
>
> In SOLR-4718 we allowed solr.xml to be read from Zookeeper in cloud setups.  
> However, this doesn't work with an embedded ZK server because it doesn't 
> start until CoreContainer.load() is called, by which time solr.xml has 
> already been loaded.  We should move the embedded ZK startup/shutdown logic 
> out of CoreContainer and into SolrDispatchFilter.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to