You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shawn Heisey (JIRA)" <ji...@apache.org> on 2017/05/09 21:13:04 UTC

[jira] [Updated] (SOLR-10652) provide working default values for ConcurrentUpdateSolrClient.Builder

     [ https://issues.apache.org/jira/browse/SOLR-10652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shawn Heisey updated SOLR-10652:
--------------------------------
    Attachment: SOLR-10652.patch

First crack at a patch to implement default values.  I have no idea what good values are, so I just came up with some numbers. I created a new constructor with a TODO for 7.0 when the deprecated constructors are removed.

> provide working default values for ConcurrentUpdateSolrClient.Builder
> ---------------------------------------------------------------------
>
>                 Key: SOLR-10652
>                 URL: https://issues.apache.org/jira/browse/SOLR-10652
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 6.5.1
>            Reporter: Karl Richter
>         Attachments: SOLR-10652.patch
>
>
> It'd be nice if `new Builder("http://localhost:8983/solr").build()` would work without specification of `queueSize` (triggers
> {code}
> Caused by: java.lang.IllegalArgumentException
> 	at java.util.concurrent.LinkedBlockingQueue.<init>(LinkedBlockingQueue.java:261)
> 	at org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient.<init>(ConcurrentUpdateSolrClient.java:145)
> 	at org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient$Builder.build(ConcurrentUpdateSolrClient.java:694)
> {code}
> and other values since those are mostly for fine tuning that there's no need to let the user run into the `IllegalArgumentException`. If `queueSize` and other options provided by `Builder` need to be set in all cases, this should be documented in `Builder.build` and `Builder.with[property]` and illegal values be caught before `java.util.concurrent.LinkedBlockingQueue.<init>(LinkedBlockingQueue.java:261)` because that's more verbose and intuitive.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org