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 "Joshi, Shital" <Sh...@gs.com> on 2014/02/21 22:34:10 UTC

hardcommit setting in solrconfig

Hello,

We have following hard commit setting in solrconfig.xml.

<updateHandler class="solr.DirectUpdateHandler2">
    <updateLog>
      <str name="dir">${solr.ulog.dir:}</str>
    </updateLog>

     <autoCommit>
       <maxTime>${solr.autoCommit.maxTime:600000}</maxTime>
       <maxDocs>100000</maxDocs>
       <openSearcher>true</openSearcher>
     </autoCommit>
  </updateHandler>

Shouldn't we see DirectUpdateHandler2; start commit  and DirectUpdateHandler2; end_commit_flush message in our log at least every ten minutes? I understand that if we have more than 100K documents to commit, hard commit could happen earlier than 10 minutes. But we see hard commit spaced out by more than 20 to 30 minutes and sometimes couple hours. Can you please explain this behavior?

Thanks!


Re: hardcommit setting in solrconfig

Posted by Chris Hostetter <ho...@fucit.org>.
: Shouldn't we see DirectUpdateHandler2; start commit and 
: DirectUpdateHandler2; end_commit_flush message in our log at least every 
: ten minutes? I understand that if we have more than 100K documents to 
: commit, hard commit could happen earlier than 10 minutes. But we see 
: hard commit spaced out by more than 20 to 30 minutes and sometimes 
: couple hours. Can you please explain this behavior?

autoCommit's only happen if needed -- if you start up your server and 20 
minutes go by w/o any updates that need committed, there won't be a 
commit.  if after 20 minutes of uptime you send a single document, then 
with your autoCommit setting of 10 minutes, a max of 10 more minutes will 
elapse before commit happens automaticaly - if you explicitly commit 
before the 10 minutes are up, no auto commiting will happen.


-Hoss
http://www.lucidworks.com/

Re: hardcommit setting in solrconfig

Posted by Shawn Heisey <so...@elyograg.org>.
On 2/21/2014 2:34 PM, Joshi, Shital wrote:
> <updateHandler class="solr.DirectUpdateHandler2">
>      <updateLog>
>        <str name="dir">${solr.ulog.dir:}</str>
>      </updateLog>
>
>       <autoCommit>
>         <maxTime>${solr.autoCommit.maxTime:600000}</maxTime>
>         <maxDocs>100000</maxDocs>
>         <openSearcher>true</openSearcher>
>       </autoCommit>
>    </updateHandler>
>
> Shouldn't we see DirectUpdateHandler2; start commit  and DirectUpdateHandler2; end_commit_flush message in our log at least every ten minutes? I understand that if we have more than 100K documents to commit, hard commit could happen earlier than 10 minutes. But we see hard commit spaced out by more than 20 to 30 minutes and sometimes couple hours. Can you please explain this behavior?

The autoCommit will not happen if you haven't indexed anything since the 
last commit.  As I understand it, the timer and document counter don't 
actually start until the moment you send an update request (add, update, 
or delete).  If no updates have come in, they are turned off once the 
commit completes.

Are you seeing this happen when you do not have delays between updates?

Thanks,
Shawn