mirror of https://github.com/apache/lucene.git
SOLR-2342: don't let hot add/updates starve commit
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1070691 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8c6f28451a
commit
573ecf2e16
|
@ -91,7 +91,9 @@ public class DirectUpdateHandler2 extends UpdateHandler {
|
|||
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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue