mirror of https://github.com/apache/lucene.git
remove last vestiges of maxPendingDeletes from DUH2
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@656826 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
14d84045cc
commit
12bde0cc22
|
@ -135,8 +135,6 @@ public class DirectUpdateHandler2 extends UpdateHandler {
|
|||
// tracks when auto-commit should occur
|
||||
protected final CommitTracker tracker;
|
||||
|
||||
protected int maxPendingDeletes = -1;
|
||||
|
||||
// iwCommit protects internal data and open/close of the IndexWriter and
|
||||
// is a mutex. Any use of the index writer should be protected by iwAccess,
|
||||
// which admits multiple simultaneous acquisitions. iwAccess is
|
||||
|
@ -148,7 +146,6 @@ public class DirectUpdateHandler2 extends UpdateHandler {
|
|||
|
||||
public DirectUpdateHandler2(SolrCore core) throws IOException {
|
||||
super(core);
|
||||
maxPendingDeletes = core.getSolrConfig().getInt("updateHandler/maxPendingDeletes", -1);
|
||||
|
||||
ReadWriteLock rwl = new ReentrantReadWriteLock();
|
||||
iwAccess = rwl.readLock();
|
||||
|
|
|
@ -190,34 +190,4 @@ public class AutoCommitTest extends AbstractSolrTestCase {
|
|||
assertQ("but not this", req("id:531") ,"//result[@numFound=0]" );
|
||||
}
|
||||
|
||||
public void testMaxPending() throws Exception {
|
||||
|
||||
DirectUpdateHandler2 updater = (DirectUpdateHandler2)SolrCore.getSolrCore().getUpdateHandler();
|
||||
updater.maxPendingDeletes = 14;
|
||||
|
||||
XmlUpdateRequestHandler handler = new XmlUpdateRequestHandler();
|
||||
handler.init( null );
|
||||
|
||||
SolrCore core = SolrCore.getSolrCore();
|
||||
MapSolrParams params = new MapSolrParams( new HashMap<String, String>() );
|
||||
|
||||
// Add a single document
|
||||
SolrQueryResponse rsp = new SolrQueryResponse();
|
||||
SolrQueryRequestBase req = new SolrQueryRequestBase( core, params ) {};
|
||||
for( int i=0; i<14; i++ ) {
|
||||
req.setContentStreams( toContentStreams(
|
||||
adoc("id", "A"+i, "subject", "info" ), null ) );
|
||||
handler.handleRequest( req, rsp );
|
||||
}
|
||||
assertEquals(updater.numDocsPending.get(), 14);
|
||||
|
||||
req.setContentStreams( toContentStreams(
|
||||
adoc("id", "A14", "subject", "info" ), null ) );
|
||||
handler.handleRequest( req, rsp );
|
||||
|
||||
// Lucene now manages it's own deletes.
|
||||
// assertEquals(updater.numDocsPending.get(), 0);
|
||||
// assertEquals(updater.commitCommands.get(), 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue