You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Chris M. Hostetter (Jira)" <ji...@apache.org> on 2022/06/07 20:15:00 UTC
[jira] [Commented] (SOLR-16241) JettyConfig.builder(JettyConfig) misses some properties
[ https://issues.apache.org/jira/browse/SOLR-16241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551273#comment-17551273 ]
Chris M. Hostetter commented on SOLR-16241:
-------------------------------------------
Properties of a JettyConfig (and their defaults) ....
{noformat}
boolean onlyHttp1 = false;
int port = 0;
String context = "/solr";
boolean enableV2 = true;
boolean stopAtShutdown = true;
Long waitForLoadingCoresToFinishMs = 300000L;
Map<ServletHolder, String> extraServlets = new TreeMap<>();
Map<Class<? extends Filter>, String> extraFilters = new LinkedHashMap<>();
SSLConfig sslConfig = null;
int portRetryTime = 60;
{noformat}
Properties "copied" by {{JettyConfig.builder(JettyConfig)}} ...
{noformat}
builder.port = other.port;
builder.context = other.context;
builder.stopAtShutdown = other.stopAtShutdown;
builder.extraServlets = other.extraServlets;
builder.extraFilters = other.extraFilters;
builder.sslConfig = other.sslConfig;
{noformat}
The Delta: properties that have setters you can override, but things like {{MiniSolrCloudCluster}} will completely ignore your changes (and use these {{JettyConfig.Builder}} defaults) because it depends on {{JettyConfig.builder(JettyConfig)}} ...
{noformat}
boolean onlyHttp1 = false;
boolean enableV2 = true;
Long waitForLoadingCoresToFinishMs = 300000L;
int portRetryTime = 60;
{noformat}
> JettyConfig.builder(JettyConfig) misses some properties
> -------------------------------------------------------
>
> Key: SOLR-16241
> URL: https://issues.apache.org/jira/browse/SOLR-16241
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Chris M. Hostetter
> Priority: Major
>
> Since JettyConfig instances are immutable, there is a Builder pattern for them, and a static {{JettyConfig.builder(JettyConfig other)}} method to create a new Builder from an existing JettyConfig.
> But this method only sets 6 of the 10 properties that available in the {{JettyConfig}} constructor (and Builder)
> This can easily bite you when using any code path that depends on {{JettyConfig.builder(JettyConfig other)}}
> Notably this impacts any usage of {{MiniSolrCloudCluster}} which _always_ calls {{JettyConfig.builder(JettyConfig other)}} when starting up jetty nodes – so 40% of the options you may try to manipulate on your {{JettyConfig}} will be completely ignored once {{MiniSolrCloudCluster}} actually starts the jetty nodes
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org