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: Does solr support two phase commit or any other distributed transaction protocol?
Date Tue, 09 Aug 2016 14:24:36 GMT
On 8/9/2016 7:55 AM, Pablo Anzorena wrote:
> That's it. Thanks.

Solr doesn't support transactions in the way that most people with a
database background imagine them.

With a typical database server, all changes to the database that happen
on a single DB connection can be committed or rolled back completely
independently from updates that happen on other DB connections.

Solr doesn't work this way.

In a Lucene index (Solr is a Lucene program), a "transaction" is all
updates made since the last commit with openSearcher=true.  This
includes ALL updates made, regardless of where they came from.  So if
you have a dozen different threads/processes making changes to your Solr
index, then have something do a commit, all of the updates made by those
12 sources before the commit will be committed.  There is no concept of
an individual transaction.

Adding the DB transaction model would be a *major* development effort,
and there's a good chance that adding it would destroy the blazing
search performance that Solr and Lucene are known for.

Thanks,
Shawn


Mime
View raw message