You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Lars Noschinski <la...@qaware.de> on 2016/05/12 16:46:44 UTC

Atomicity of commits in Solr Cloud?

Hi everyone,

does Solr (6.0) give an guarantees about the atomicity of commits in Solr
Cloud? I.e., if I add a large amount of documents, then commit, do the
changed state become visible on all shards at the same time? I could not
find anything towards that, so I assume that there is no such guarantee.

Best regards,
  Lars
------------------------------
Lars Noschinski
Softwareingenieur

QAware GmbH
Aschauer Str. 32
81549 München, Germany
Tel +49 89 232315-213
Fax +49 89 232315-129
lars.noschinski@qaware.de
www.qaware.de
------------------------------
Geschäftsführer: Christian Kamm, Bernd Schlüter, Johannes Weigend, Dr.
Josef Adersberger
Registergericht: München
Handelsregisternummer: HRB 163761

Re: Atomicity of commits in Solr Cloud?

Posted by John Bickerstaff <jo...@johnbickerstaff.com>.
I'm not a dev, but I would assume the following if I were concerned with
speed and atomicity

A.  A commit WILL be reflected in all appropriate shards / replicas in a
very short time.
          I believe Solr Cloud guarantees this, although the time frame
will be dependent on "B"
B. Network, processor, size, complexity of commit and indexing, and other
variables will have an affect on how fast it happens
C. It is possible that during the process of getting the data to all Solr
instances, a user could query at just the right moment and get "stale"
data, but that state will not last very long.

Others on this list may correct me... but that's my best understanding.

On Thu, May 12, 2016 at 10:46 AM, Lars Noschinski <lars.noschinski@qaware.de
> wrote:

> Hi everyone,
>
> does Solr (6.0) give an guarantees about the atomicity of commits in Solr
> Cloud? I.e., if I add a large amount of documents, then commit, do the
> changed state become visible on all shards at the same time? I could not
> find anything towards that, so I assume that there is no such guarantee.
>
> Best regards,
>   Lars
> ------------------------------
> Lars Noschinski
> Softwareingenieur
>
> QAware GmbH
> Aschauer Str. 32
> 81549 München, Germany
> Tel +49 89 232315-213
> Fax +49 89 232315-129
> lars.noschinski@qaware.de
> www.qaware.de
> ------------------------------
> Geschäftsführer: Christian Kamm, Bernd Schlüter, Johannes Weigend, Dr.
> Josef Adersberger
> Registergericht: München
> Handelsregisternummer: HRB 163761
>

Re: Atomicity of commits in Solr Cloud?

Posted by Shawn Heisey <ap...@elyograg.org>.
On 5/12/2016 10:46 AM, Lars Noschinski wrote:
> does Solr (6.0) give an guarantees about the atomicity of commits in Solr
> Cloud? I.e., if I add a large amount of documents, then commit, do the
> changed state become visible on all shards at the same time? I could not
> find anything towards that, so I assume that there is no such guarantee.

Each shard replica may have different information in the Solr caches,
because they handled different queries.  If you have cache autowarming
enabled, it may take a substantially different amount of time to warm
the caches, so the commit may take very different amounts of time on
each replica.  The changes may become visible on one replica sooner than
they become visible on another replica, which means that you might have
different requests return different information if executed before the
commit as a whole completes.

I would hope that if waitSearcher=true on the commit (which is the
default setting), that the client would not receive a response until the
entire collection across the cloud had processed the commit, but I do
not know if that is in fact how it works.

Thanks,
Shawn