We need to be pretty nit-picky here.

bq: do a full copy of an index instead of only the necessary files

It's all about "necessary files". "necessary" here means a
all changed segments. Since segments are not changed
after a commit, then replication can safely ignore any segments
files it already has and only copies new segments.

The rub is that "new" includes merged segments. And it's
possible that _all_ current segments are merged into a new
segment. At that point, technically, a full copy is done.

You can force this by an optimize (not recommended) or,
perhaps expungeDeletes options.

Here's a great video of segment merging, the third one down
is the TieredMergePolicy which has been the default for some
time.

http://blog.mikemccandless.com/2011/02/visualizing-lucenes-segment-merges.html

And, if you want to force a full replication, shut down the slave,
"rm -rf data". (data should be the parent of the "index" dir) and
restart solr.

Best,
Erick

On Mon, Mar 6, 2017 at 8:06 AM, Chris Ulicny <culicny@iq.media> wrote:
> Hi all,
>
> We've recently had some issues with a 5.1.0 core copying the whole index
> when it was set to replicate from a master core.
>
> I've read that if there are documents that have been added to the slave
> core by mistake, it will do a full copy. Though we are still investigating,
> this is probably not the cause of it.
>
> Are there any other conditions in which the slave core will do a full copy
> of an index instead of only the necessary files?
>
> Thanks,
> Chris

Reply via email to