Discussion:
hardcommit setting in solrconfig
Joshi, Shital
2014-02-21 21:34:10 UTC
Permalink
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!
Chris Hostetter
2014-02-21 21:43:06 UTC
Permalink
: 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/
Shawn Heisey
2014-02-21 21:51:03 UTC
Permalink
Post by Joshi, Shital
<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

Loading...