Re: Recover a Solr Node

2018-04-10 Thread Erick Erickson
There's actually not much that's _required_ in core.properties, so if
you want to try this just create a core directory by hand under
SOLR_HOME and name it by the pattern that other cores use. Then use a
core.properties file from another replica in the same collection and
substitute every property in the file with the values from the deleted
node in ZK. If you put the index in the data dir and restart Solr you
should be good to go.

But as Shawn says, there are other issues.

WARNING: even a small mis-step have "interesting" results.

No, I don't think this is something I think would be good to add to
the collections API. Having replicas distributed among the cluster and
backup/restore are the supported ways of not winding up in this
situation. Having the collections command would be too easy to
mis-use. Any reconstructed node would NOT have any data associated
with it, so it requires being in a non-standard setup to be useful
IMO.

Frankly, to cover your situation, why not copy from one level up? I.e.
save off "collection1_core1_replica1n"?

Assuming you have a leader, ADDREPLICA is also a way to build out your
cluster after a failure.

Best,
Erick

On Tue, Apr 10, 2018 at 11:16 AM, Shawn Heisey  wrote:
> On 4/9/2018 2:28 PM, Karthik Ramachandran wrote:
>> We are using Solr cloud with 3 nodes, no replication with 8 shard per node
>> per collection. We have multiple collection on that node.
>>
>> We have backup of data the data folder, so we can recover it, is there a
>> way to reconstruct core.properties for all the replica's for that node?
>
> If the router in use for a multi-shard collection is compositeId, then
> the core.properties file does NOT contain all the information necessary
> to restore the shard in the collection.  Part of the information will
> ONLY be in zookeeper.  I am thinking specifically the hash range for the
> shard.
>
> I think it might be a good idea to write all information necessary to
> fully recreate a shard in a collection to core.properties.  Make it
> possible to reconstruct a SolrCloud if the zookeeper database is lost.
> Store information currently only in ZK, like the router name, shard hash
> range, etc.
>
> Thanks,
> Shawn
>


Re: Recover a Solr Node

2018-04-10 Thread Shawn Heisey
On 4/9/2018 2:28 PM, Karthik Ramachandran wrote:
> We are using Solr cloud with 3 nodes, no replication with 8 shard per node
> per collection. We have multiple collection on that node.
>
> We have backup of data the data folder, so we can recover it, is there a
> way to reconstruct core.properties for all the replica's for that node?

If the router in use for a multi-shard collection is compositeId, then
the core.properties file does NOT contain all the information necessary
to restore the shard in the collection.  Part of the information will
ONLY be in zookeeper.  I am thinking specifically the hash range for the
shard.

I think it might be a good idea to write all information necessary to
fully recreate a shard in a collection to core.properties.  Make it
possible to reconstruct a SolrCloud if the zookeeper database is lost. 
Store information currently only in ZK, like the router name, shard hash
range, etc.

Thanks,
Shawn



Re: Recover a Solr Node

2018-04-10 Thread Karthik Ramachandran
Eric,
Just throwing whats's in my mind.

I see that collection cluster state has the all the information to create
the core.properties.  If I create the core.properties from the cluster
state and then reload the collection will that bring the collection up?

I did try the above step, but instead of reload I restarted the solr
instance and collection was up and running.

Do you think if would be worth putting the support in solr collection api?

With Thanks & Regards
Karthik


Re: Recover a Solr Node

2018-04-10 Thread Erick Erickson
Not that I know of. You might be able to do an ADDREPLICA for each one.

This is a risk when running without replicas.

Best,
Erick

On Mon, Apr 9, 2018 at 1:28 PM, Karthik Ramachandran  wrote:
> We are using Solr cloud with 3 nodes, no replication with 8 shard per node
> per collection. We have multiple collection on that node.
>
> We have backup of data the data folder, so we can recover it, is there a
> way to reconstruct core.properties for all the replica's for that node?
>
> --
> With Thanks & Regards
> Karthik