MUST be applied after
OK, here's a preliminary cut at this, no tests yet, but I was looking at logging and it seems to be doing what I want, putting up for inspection by the curious...
A couple of notes:
1> It turns out that to make this work I needed to incorporate
SOLR-4013 and SOLR-3980. I'd appreciate anyone looking at the synchronization I did around the member variable "loadingCores". The intent here is to keep two threads from creating the same core at the same time.
1a> I'm assuming that there is exactly one CoreContainer per JVM. Otherwise I don't understand how any of the synchronization works on the member vars....
1b> Running a simple test things went all to hell in JMX stuff without the synchronization, apparently the multiple thread problem shows up early and often.
1c> synchronization is always "interesting", so the more eyes the better.
1d> In particular, any good suggestions about bailing out of the sleep loop? Since cores can take quite a while to warm, I'm having a hard time thinking of a good default. I suppose another attribute where the provider is mentioned. There's no reason a custom provider has to be present, so requiring a timeout from the provider doesn't seem workable.
2> I've implemented a trivial CoreDescriptorProvider for a PoC, it's at the bottom. It pre-supposes you have 4 collections, the accompanying Solr.xml is also below.
3> I'm going to put this away for a couple of hours and come back to it with fresh eyes, this copy is purely for the curious/critical...
*****sample custom descriptor provider
public class TestCoreContainerProvider implements CoreDescriptorProvider
public CoreDescriptor getDescriptor(CoreContainer container, String name)
if (! "collection2".equals(name) && ! "collection3".equals(name) && ! "collection4".equals(name)) return null;
CoreDescriptor cd = new CoreDescriptor(container, name, name); // True hack because I know the dirs are the same as the collection.
public boolean isPersist(String s)
public Collection<String> getCoreNames()
return new ArrayList<String>(Arrays.asList("collection2", "collection3", "collection4"));
- solr.xml. Note no ZK stuff.
<solr persistent="false" sharedLib="../../../../../blahblah/out/artifacts/provider_jar">
<cores adminPath="/admin/cores" defaultCoreName="collection1" host="$
<core name="collection1" instanceDir="collection1" />