lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan McKinley" <ryan...@gmail.com>
Subject autocommit bug
Date Sun, 18 Feb 2007 08:29:03 GMT
found one that is my fault!

If you commit a document while the updater is autocommiting, it is
likely to immediatly start another autocommit (unless you are also
using maxDocs).

Here is the one line patch to fix it:


Index: DirectUpdateHandler2.java
===================================================================
--- DirectUpdateHandler2.java	(revision 508885)
+++ DirectUpdateHandler2.java	(working copy)
@@ -640,7 +640,7 @@

       // check if docs have been submitted since the commit started
       if( lastAddedTime > started ) {
-        if( docsSinceCommit > docsUpperBound ) {
+        if( docsUpperBound > 0 && docsSinceCommit > docsUpperBound ) {
           pending = scheduler.schedule( this, 100, TimeUnit.MILLISECONDS );
         }
         else if( timeUpperBound > 0 ) {

Mime
View raw message