[
https://issues.apache.org/jira/browse/SOLR-5609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13910477#comment-13910477
]
Mark Miller commented on SOLR-5609:
-----------------------------------
{noformat}
+ try {
+ if(reader.getZkClient().exists(ZkStateReader.CLUSTER_PROPS,true))
+
reader.getZkClient().setData(ZkStateReader.CLUSTER_PROPS,ZkStateReader.toJSON(m),true);
+ else
+ reader.getZkClient().create(ZkStateReader.CLUSTER_PROPS,
ZkStateReader.toJSON(m),CreateMode.PERSISTENT, true);
+ clusterProps = reader.getClusterProps();
+ } catch (Exception e) {
+ log.error("Unable to set cluster property", e);
+
+ }
{noformat}
This doesn't seem good? You just log an error and don't return a problem to the
client? And it's not handling interrupted exception properly?
We should also probably use the ensureExists code up front to create the
clusterstate prop node rather than do this if / then stuff.
Can we change this code to be more in line with similar code that is already in?
> Don't let cores create slices/named replicas
> --------------------------------------------
>
> Key: SOLR-5609
> URL: https://issues.apache.org/jira/browse/SOLR-5609
> Project: Solr
> Issue Type: Sub-task
> Components: SolrCloud
> Reporter: Noble Paul
> Fix For: 4.7, 5.0
>
> Attachments: SOLR-5609_5130.patch, SOLR-5609_5130.patch,
> SOLR-5609_5130.patch, SOLR-5609_5130.patch
>
>
> In SolrCloud, it is possible for a core to come up in any node , and register
> itself with an arbitrary slice/coreNodeName. This is a legacy requirement and
> we would like to make it only possible for Overseer to initiate creation of
> slice/replicas
> We plan to introduce cluster level properties at the top level
> /cluster-props.json
> {code:javascript}
> {
> "noSliceOrReplicaByCores":true"
> }
> {code}
> If this property is set to true, cores won't be able to send STATE commands
> with unknown slice/coreNodeName . Those commands will fail at Overseer. This
> is useful for SOLR-5310 / SOLR-5311 where a core/replica is deleted by a
> command and it comes up later and tries to create a replica/slice
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]