On 8/27/2014 10:44 AM, Bryan Bende wrote:
> Theoretically this shouldn't happen, but is it possible that the two
> replicas for a given shard are not fully in sync?
>
> Say shard1 replica1 is missing a document that is in shard1 replica2... if
> you run a query that would hit on that document and run it a bunch of
> times, sometimes replica 1 will handle the request and sometimes replica 2
> will handle it, and it would change your number of results if one of them
> is missing a document. You could write a program that compares each
> replica's documents by querying them with distrib=false.
>
> If there was a replica out of sync, I would think it would detect that on a
> restart when comparing itself against the leader for that shard, but I'm
> not sure.

A replica out of sync is a possibility, but the most common reason for a
changing numFound is because the overall distributed index has more than
one document with the same uniqueKey value -- different versions of the
same document in more than one shard.

SolrCloud tries really hard to never end up with replicas out of sync,
but either due to highly unusual circumstances or bugs, it could still
happen.

Thanks,
Shawn

Reply via email to