Hi Shalin,

Thanks very much for your detailed explanation!

Regards,
Yandong

2012/8/21 Shalin Shekhar Mangar <shalinman...@gmail.com>

> On Tue, Aug 21, 2012 at 8:47 AM, Yandong Yao <yydz...@gmail.com> wrote:
>
> > Hi guys,
> >
> > From http://wiki.apache.org/solr/MergingSolrIndexes,  it said 'Using
> > "srcCore", care is taken to ensure that the merged index is not corrupted
> > even if writes are happening in parallel on the source index'.
> >
> > What does it means? If there are deletion request during merging, will
> this
> > deletion be processed correctly after merging finished?
> >
>
> Solr keeps an instance of the IndexReader for each srcCore which is a
> static snapshot of the index at the time of the merge request. This static
> snapshot is merged to the target core. Therefore any insert/delete request
> made to the srcCores after the merge request will not affect the merged
> index.
>
>
> >
> > 1)
> > eg:  I have an existing core 'core0', and I want to merge core 'core1'
> and
> > 'core2' to core 'core0', so I will use
> >
> >
> http://localhost:8983/solr/admin/cores?action=mergeindexes&core=core0&srcCore=core1&srcCore=core2
> > ,
> >
> > During the merging happens, core0, core1, core2 have received deletion
> > request to delete some old documents, will the final core 'core0'
> contains
> > all content from 'core1' and 'core2' and also all documents matches
> > deletion criteria has been deleted?
> >
>
> The final core0 will not have documents deleted by requests made on core0.
> However, documents deleted on core1 and core2 will still be in core0 if the
> merge started before those requests were made.
>
>
> >
> > 2)
> > And if core0, core1, and core2 are processing deletion request, at the
> same
> > time core merge request comes in, what will happen then? Will merge
> request
> > block until deletion finished on all cores?
> >
>
> I believe core0 will continue to process deletion requests concurrently
> with the merge. As for core1 and core2, since a merge reserves their
> IndexReader, the answer depends on when a commit happens on core1 and
> core2. If, for example, 2 deletions were made on core1 and then a commit
> was issued (or autoCommit happened) and then the merge was triggered then
> the final core0 will not have those documents but it may still have docs
> deleted after the commit.
>
>
> >
> > Thanks very much in advance!
> >
> > Regards,
> > Yandong
> >
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>

Reply via email to