Hi Erick,
sorry for the slow reply. You are right, the information is not
persisted. Once I do a restart there is no information about the
replication source anymore. That explains why I could not find it
anywhere persisted ;-) I thought I had tested that last week but must
have not done so as it worked just fine now.
thanks,
Hendrik
On 20.10.2017 16:39, Erick Erickson wrote:
Does that persist even after you restart Solr on the target cluster?
And that clears up one bit of confusion I had, I didn't know how you
were having each shard on the target cluster use a different master URL
given they all use the same solrconfig file. I was guessing some magic with
system variables, but it turns out you were waaaay ahead of me and
not configuring the replication in solrconfig at all.
But no, I know of no API level command that works to do what you're asking.
I also don't know where that data is persisted, I'm afraid you'll have to go
code-diving for all the help I can be....
Using fetchindex this way in SolrCloud is something of an edge case. It'll
probably be around forever since replication is used as a fall-back when
a replica syncs, but there'll be some bits like this hanging around I'd guess.
Best,
Erick
On Thu, Oct 19, 2017 at 11:55 PM, Hendrik Haddorp
<hendrik.hadd...@gmx.net> wrote:
Hi Erick,
that is actually the call I'm using :-)
If you invoke
http://solr_target_machine:port/solr/core/replication?command=details after
that you can see the replication status. But even after a Solr restart the
call still shows the replication relation and I would like to remove this so
that the core looks "normal" again.
regards,
Hendrik
On 20.10.2017 02:31, Erick Erickson wrote:
Little known trick:
The fetchIndex replication API call can take any parameter you specify
in your config. So you don't have to configure replication at all on
your target collection, just issue the replication API command with
masterUrl, something like:
http://solr_target_machine:port/solr/core/replication?command=fetchindex&masterUrl=http://solr_source_machine:port/solr/core
NOTE, "core" above will be something like collection1_shard1_replica1....
During the fetchindex, you won't be able to search on the target
collection although the source will be searchable.
Now, all that said this is just copying stuff. So let's say you've
indexed to your source cluster and set up your target cluster (but
don't index anything to the target or do the replication etc). Now if
you shut down the target cluster and just copy the entire data dir
from each source replica to each target replica then start all the
target Solr instances up you'll be fine.
Best,
Erick
On Thu, Oct 19, 2017 at 1:33 PM, Hendrik Haddorp
<hendrik.hadd...@gmx.net> wrote:
Hi,
I want to transfer a Solr collection from one SolrCloud to another one.
For
that I create a collection in the target cloud using the same config set
as
on the source cloud but with a replication factor of one. After that I'm
using the Solr core API with a "replication?command=fetchindex" command
to
transfer the data. In the last step I'm increasing the replication
factor.
This seems to work fine so far. When I invoke
"replication?command=details"
I can see my replication setup and check if the replication is done. In
the
end I would like to remove this relation again but there does not seem to
be
an API call for that. Given that the replication should be a one time
replication according to the API on
https://lucene.apache.org/solr/guide/6_6/index-replication.html this
should
not be a big problem. It just does not look clean to me to leave this in
the
system. Is there anything I'm missing?
regards,
Hendrik