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 Per Steffensen <st...@designware.dk> on 2012/01/27 13:05:50 UTC
Commit and sessions
Hi
If I have added some document to solr, but not done explicit commit yet,
and I get a power outage, will I then loose data? Or asked in another
way, does data go into persistent store before commit? How to avoid
possibility of loosing data?
Does solr have some kind of session concept, so that different threads
can add documents to the same solr, and when one of them says "commit"
it is only the documents added by this thread that gets committed? Or is
it always "all documents added by any thread since last commit" that
gets committed?
Regards, Per Steffensen
Re: Commit and sessions
Posted by Sami Siren <ss...@gmail.com>.
On Fri, Jan 27, 2012 at 3:25 PM, Jan Høydahl <ja...@cominvent.com> wrote:
> Hi,
>
> Yep, anything added between two commits must be regarded as lost in case of crash.
> You can of course minimize this interval by using a low "commitWithin". But after a crash you should always investigate whether the last minutes of adds made it.
In addition to what Jan said I think you also need to watch out for
out of memory exceptions and filled disk space because I think you
loose your docs (since last commit) in those cases too.
--
Sami Siren
Re: Commit and sessions
Posted by Jan Høydahl <ja...@cominvent.com>.
Hi,
Yep, anything added between two commits must be regarded as lost in case of crash.
You can of course minimize this interval by using a low "commitWithin". But after a crash you should always investigate whether the last minutes of adds made it.
A transaction log feature is being developed, but not there yet: https://issues.apache.org/jira/browse/SOLR-2700
--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com
On 27. jan. 2012, at 13:05, Per Steffensen wrote:
> Hi
>
> If I have added some document to solr, but not done explicit commit yet, and I get a power outage, will I then loose data? Or asked in another way, does data go into persistent store before commit? How to avoid possibility of loosing data?
>
> Does solr have some kind of session concept, so that different threads can add documents to the same solr, and when one of them says "commit" it is only the documents added by this thread that gets committed? Or is it always "all documents added by any thread since last commit" that gets committed?
>
> Regards, Per Steffensen