lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject Re: Slave replicating partially before write operation completes on master
Date Sun, 23 Apr 2017 17:31:50 GMT
On 4/22/2017 12:57 PM, Geepalem wrote:
> We have below critical issue in our project. Please suggest how to fix this issue.
>
> Whenever indexing happening on master, slave replicating documents
> partially. Due to this, search results on website are showing wrongly.

You're going to need to describe exactly what you mean by replicating
partially, and tell me whether my guess below is right:

My best guess is that you are intending to add/change X number of
documents during an indexing run, and finding that the slave replicates
before the indexing is complete, seeing only part of those changes, then
eventually gets them all on a later replication.

Something to mention: Replication is not going to occur unless a
triggering event happens on the master.  Typically, replication is
configured so that it happens after a commit that opens a new searcher. 
Replication after optimize can also be configured.

So, my best guess is that commits are happening on the master before the
entire indexing process has finished.  The most likely reason for this
is that you have configured autoSoftCommit in your solrconfig.xml on the
master.  If you want your slaves to not replicate until the entire
indexing run is finished, then you're going to want to remove
autoSoftCommit (but leave autoCommit with openSearcher set to false),
and do an explicit commit from your update client after the indexing run
is complete.

https://lucidworks.com/understanding-transaction-logs-softcommit-and-commit-in-sorlcloud/

That blog post has a general recommendation to use autoSoftCommit and
never do an explicit commit ... but my best guess about your use case is
one where that's not a good idea.

Thanks,
Shawn


Mime
View raw message