Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

remove last vestiges of maxPendingDeletes from DUH2

Mike Klaas12bde0cc22dc
diff --git a/src/java/org/apache/solr/update/DirectUpdateHandler2.java b/src/java/org/apache/solr/update/DirectUpdateHandler2.java
index cbbcd3503f8..c34701351a2 100644
--- a/src/java/org/apache/solr/update/DirectUpdateHandler2.java
+++ b/src/java/org/apache/solr/update/DirectUpdateHandler2.java
@@ -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();
diff --git a/src/test/org/apache/solr/update/AutoCommitTest.java b/src/test/org/apache/solr/update/AutoCommitTest.java
index 964da687192..5c028bc390e 100644
--- a/src/test/org/apache/solr/update/AutoCommitTest.java
+++ b/src/test/org/apache/solr/update/AutoCommitTest.java
@@ -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);
- }
-
}