mirror of https://github.com/apache/lucene.git
The queue size for ConcurrentUpdateSolrClient should default to 10 instead of throwing an IllegalArgumentException
This commit is contained in:
parent
f2dd3c5f85
commit
8c855fa287
|
@ -153,6 +153,9 @@ Bug Fixes
|
|||
* SOLR-11608: Correctly parse the new core-name in the V2 core rename API.
|
||||
(Jason Gerlowski via Anshum Gupta)
|
||||
|
||||
* SOLR-11256: The queue size for ConcurrentUpdateSolrClient should default to 10 instead of throwing an
|
||||
IllegalArgumentException. (Jason Gerlowski, Anshum Gupta)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
* SOLR-11285: Refactor autoscaling framework to avoid direct references to Zookeeper and Solr
|
||||
|
|
|
@ -772,7 +772,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
|
|||
*/
|
||||
public static class Builder extends SolrClientBuilder<Builder> {
|
||||
protected String baseSolrUrl;
|
||||
protected int queueSize;
|
||||
protected int queueSize = 10;
|
||||
protected int threadCount;
|
||||
protected ExecutorService executorService;
|
||||
protected boolean streamDeletes;
|
||||
|
@ -803,7 +803,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* The number of documents to batch together before sending to Solr.
|
||||
* The number of documents to batch together before sending to Solr. If not set, this defaults to 10.
|
||||
*/
|
||||
public Builder withQueueSize(int queueSize) {
|
||||
if (queueSize <= 0) {
|
||||
|
|
|
@ -30,4 +30,12 @@ public class ConcurrentUpdateSolrClientBuilderTest extends LuceneTestCase {
|
|||
public void testRejectsMissingBaseSolrUrl() {
|
||||
new Builder(null).build();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMissingQueueSize() {
|
||||
try (ConcurrentUpdateSolrClient client = new Builder("someurl").build()){
|
||||
// Do nothing as we just need to test that the only mandatory parameter for building the client
|
||||
// is the baseSolrUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue