[ 
https://issues.apache.org/jira/browse/SOLR-13142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16748516#comment-16748516
 ] 

Lyle commented on SOLR-13142:
-----------------------------

Hi [~gus_heck], 

Sorry for put "can anyone provide help" in Jira ticket, I just meet this issue 
and don't know if I have any config error or solr have changed the default 
behavior for autoscaling.

SOLR-13159 seems same as this issue, However, from [Upgrading to 7.x Releases 
Solr 
7.6|[https://lucene.apache.org/solr/guide/7_6/solr-upgrade-notes.html#solr-7-6%20with%20respect%20to%20default%20core%20placement]
 ] Autoscaling section, it seems the default behavior have changed, *by default 
a node with the fewest number of cores already on it and the highest available 
freedisk will be selected for new core creation*, and *It removes the default 
setting of {{maxShardsPerNode=1}} when an autoscaling policy is in place.*  So 
even I set maxShardsPerNode=1 in create collection request, It will not effect 
since the autoscaling has been set in [^autoscaling.json].

attach files for comparison.

 

Thanks,

Lyle

> Create Collection will put two replicas in same node
> ----------------------------------------------------
>
>                 Key: SOLR-13142
>                 URL: https://issues.apache.org/jira/browse/SOLR-13142
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud
>    Affects Versions: 7.6
>            Reporter: Lyle
>            Priority: Major
>         Attachments: CLUSTERSTATUS.json, autoscaling.json, diagnostics.json
>
>
> I have a solr cluster with two nodes, and both of them are alive.
> Solr cluster: 
> [http://10.58.91.47:8082/search]
> [http://10.58.91.83:8082/search]
>  
> In solr7.5 when create a collection in two nodes cluster with shards=1 and 
> replicationFactor=2, each node will have a replica.
> However, in solr7.6, when use same request to create collection, two replicas 
> will be put in same solr node.
> example:
> create collection request:
> [http://10.58.91.47:8082/search/admin/collections?action=CREATE&name=NewCollection&numShards=1&replicationFactor=2&collection.configName=conf&shards=shard1&maxShardsPerNode=1]
> response:
> {code:java}
> {
> "responseHeader": {
> "status": 0,
> "QTime": 5392
> },
> "success": {
> "10.58.91.47:8082_search": {
> "responseHeader": {
> "status": 0,
> "QTime": 2584
> },
> "core": "NewCollection_shard1_replica_n1"
> }
> }
> }
> {code}
> use clusterstatus request to query replica info:
> request: 
> [http://10.58.91.83:8082/search/admin/collections?action=CLUSTERSTATUS&collection=NewCollection]
> response:
> {code:java}
> Tree
> Chart
> JSON Input
> {
> "responseHeader": {
> "status": 0,
> "QTime": 8
> },
> "cluster": {
> "collections": {
> "NewCollection": {
> "pullReplicas": "0",
> "replicationFactor": "2",
> "shards": {
> "shard1": {
> "range": "80000000-7fffffff",
> "state": "active",
> "replicas": {
> "core_node3": {
> "core": "NewCollection_shard1_replica_n1",
> "base_url": "http://10.58.91.47:8082/search";,
> "node_name": "10.58.91.47:8082_search",
> "state": "active",
> "type": "NRT"
> },
> "core_node4": {
> "core": "NewCollection_shard1_replica_n2",
> "base_url": "http://10.58.91.47:8082/search";,
> "node_name": "10.58.91.47:8082_search",
> "state": "active",
> "type": "NRT",
> "leader": "true"
> }
> }
> }
> },
> "router": {
> "name": "compositeId"
> },
> "maxShardsPerNode": "1",
> "autoAddReplicas": "false",
> "nrtReplicas": "2",
> "tlogReplicas": "0",
> "znodeVersion": 4,
> "configName": "conf"
> }
> },
> "properties": {
> "legacyCloud": "true"
> },
> "live_nodes": [
> "10.58.91.47:8082_search",
> "10.58.91.83:8082_search"
> ]
> }
> }
> {code}
> Is there any change for solr7.6 since I have not find any create collection 
> API changes from document.
> Could anyone please provide help?
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to