You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by ho...@apache.org on 2007/02/19 22:54:59 UTC

svn commit: r509349 - /lucene/solr/trunk/src/java/org/apache/solr/update/DirectUpdateHandler2.java

Author: hossman
Date: Mon Feb 19 13:54:58 2007
New Revision: 509349

URL: http://svn.apache.org/viewvc?view=rev&rev=509349
Log:
small bug fix from Ryan over email...

: 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:

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/update/DirectUpdateHandler2.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/update/DirectUpdateHandler2.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/update/DirectUpdateHandler2.java?view=diff&rev=509349&r1=509348&r2=509349
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/update/DirectUpdateHandler2.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/update/DirectUpdateHandler2.java Mon Feb 19 13:54:58 2007
@@ -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 ) {