[
https://issues.apache.org/jira/browse/SOLR-11026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Noble Paul resolved SOLR-11026.
-------------------------------
Resolution: Fixed
> Policy can suggest more operations than necessary
> -------------------------------------------------
>
> Key: SOLR-11026
> URL: https://issues.apache.org/jira/browse/SOLR-11026
> Project: Solr
> Issue Type: Sub-task
> Security Level: Public(Default Security Level. Issues are Public)
> Components: AutoScaling, SolrCloud
> Reporter: Shalin Shekhar Mangar
> Assignee: Noble Paul
> Labels: autoscaling
> Fix For: master (8.0), 7.1
>
>
> To reproduce:
> {code}
> ./bin/solr -e cloud -noprompt
> {code}
> Add policy and preferences:
> {code}
> { 'set-cluster-policy': [ {'cores':'<10', 'node':'#ANY'},
> {'replica':'<2', 'shard': '#EACH', 'node': '#ANY'},
> {'nodeRole':'overseer', 'replica':0} ],
> 'set-cluster-preferences': [{'minimize': 'cores'}]
> }
> {code}
> Add a trigger:
> {code}
> {
> 'set-trigger': {
> 'name' : 'node_added_trigger',
> 'event' : 'nodeAdded',
> 'waitFor' : '1s'
> }
> }
> {code}
> Shutdown a node (so only 1 is live)
> {code}
> ./bin/solr stop -p 7574
> {code}
> Add a collection with 2 shards, 1 replica
> {code}
> http://localhost:8983/solr/admin/collections?action=create&name=test&replicationFactor=1&numShards=2&maxShardsPerNode=2&wt=json
> {code}
> The diagnostic output at this point is:
> {code}
> {
> "responseHeader": {
> "status": 0,
> "QTime": 23
> },
> "diagnostics": {
> "sortedNodes": [
> {
> "node": "127.0.1.1:8983_solr",
> "cores": 2
> }
> ],
> "violations": []
> },
> "WARNING": "This response format is experimental. It is likely to change
> in the future."
> }
> {code}
> Start the other node that we had shutdown earlier:
> {code}
> "bin/solr" start -cloud -p 7574 -s "example/cloud/node2/solr" -z
> localhost:9983
> {code}
> The trigger kicks in but both cores are moved to the new node. Diagnostics
> output at steady state:
> {code}
> {
> "responseHeader": {
> "status": 0,
> "QTime": 23
> },
> "diagnostics": {
> "sortedNodes": [
> {
> "node": "127.0.1.1:7574_solr",
> "cores": 2
> },
> {
> "node": "127.0.1.1:8983_solr",
> "cores": 0
> }
> ],
> "violations": []
> },
> "WARNING": "This response format is experimental. It is likely to change
> in the future."
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]