You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2011/02/15 00:01:33 UTC

svn commit: r1070692 - in /lucene/dev/branches/branch_3x: ./ lucene/ solr/ solr/src/java/org/apache/solr/update/DirectUpdateHandler2.java

Author: mikemccand
Date: Mon Feb 14 23:01:33 2011
New Revision: 1070692

URL: http://svn.apache.org/viewvc?rev=1070692&view=rev
Log:
SOLR-2342: don't let hot add/updates starve commit

Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/solr/   (props changed)
    lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/update/DirectUpdateHandler2.java

Modified: lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/update/DirectUpdateHandler2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/update/DirectUpdateHandler2.java?rev=1070692&r1=1070691&r2=1070692&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/update/DirectUpdateHandler2.java (original)
+++ lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/update/DirectUpdateHandler2.java Mon Feb 14 23:01:33 2011
@@ -152,7 +152,9 @@ public class DirectUpdateHandler2 extend
   public DirectUpdateHandler2(SolrCore core) throws IOException {
     super(core);
 
-    ReadWriteLock rwl = new ReentrantReadWriteLock();
+    // Pass fairness=true so commit request is not starved
+    // when add/updates are running hot (SOLR-2342):
+    ReadWriteLock rwl = new ReentrantReadWriteLock(true);
     iwAccess = rwl.readLock();
     iwCommit = rwl.writeLock();