[
https://issues.apache.org/jira/browse/SOLR-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556765#comment-13556765
]
Yonik Seeley commented on SOLR-4312:
------------------------------------
I tried from 4.0 to 4.1 with mixed results.
{code}
I0=/opt/code/lusolr40
I1=/opt/code/lusolr
cd $I0/solr
ant clean example
rm -rf example/solr/zoo_data
rm -rf example/solr/collection1/data
cp -rp example e1
cp -rp example e2
cd e1
java -Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=myconf
-DzkRun -DnumShards=2 -jar start.jar
cd e2
java -Djetty.port=7574 -DzkHost=localhost:9983 -jar start.jar
cd example/exampledocs
./post.sh *xml
#kill e1
#kill e2
cd $I1/solr
ant clean example
rm -rf example/solr/zoo_data
rm -rf example/solr/collection1/data
cp -rp example e1
cp -rp example e2
# copy complete solr home
rm -rf e1/solr
rm -rf e2/solr
cp -rp $I0/solr/e1/solr ./e1/solr/
cp -rp $I0/solr/e2/solr ./e2/solr/
cd e1
java -DzkRun -jar start.jar
cd e2
java -Djetty.port=7574 -DzkHost=localhost:9983 -jar start.jar
{code}
So on bringing up the 4.1 servers with the 4.0 solr homes, I was greeted with:
{code}
Jan 17, 2013 5:45:31 PM org.apache.solr.cloud.ShardLeaderElectionContext
waitForReplicasToComeUp
INFO: Waiting until we see more replicas up: total=2 found=1 timeoutin=119655
[...]
INFO: Waiting until we see more replicas up: total=2 found=1 timeoutin=19090
Jan 17, 2013 5:47:31 PM org.apache.solr.cloud.ShardLeaderElectionContext
waitForReplicasToComeUp
INFO: Was waiting for replicas to come up, but they are taking too long -
assuming they won't come back till later
Jan 17, 2013 5:47:31 PM org.apache.solr.cloud.ShardLeaderElectionContext
runLeaderProcess
INFO: I may be the new leader - try and sync
{code}
Essentially, nothing would respond for 2 minutes because they were waiting for
the old replicas to come up. They did not recognize themselves as the previous
replicas I think because the node naming changed (at least for OS-X). See
clusterstate.json below:
{code}
{"collection1":{"shards":{
"shard1":{
"range":"80000000-ffffffff",
"replicas":{
"Rogue:8983_solr_collection1":{
"shard":"shard1",
"roles":null,
"state":"active",
"core":"collection1",
"collection":"collection1",
"node_name":"Rogue:8983_solr",
"base_url":"http://Rogue:8983/solr"},
"192.168.1.109:8983_solr_collection1":{
"shard":"shard1",
"roles":null,
"state":"active",
"core":"collection1",
"collection":"collection1",
"node_name":"192.168.1.109:8983_solr",
"base_url":"http://192.168.1.109:8983/solr",
"leader":"true"}}},
"shard2":{
"range":"0-7fffffff",
"replicas":{
"Rogue:7574_solr_collection1":{
"shard":"shard2",
"roles":null,
"state":"active",
"core":"collection1",
"collection":"collection1",
"node_name":"Rogue:7574_solr",
"base_url":"http://Rogue:7574/solr"},
"192.168.1.109:7574_solr_collection1":{
"shard":"shard2",
"roles":null,
"state":"active",
"core":"collection1",
"collection":"collection1",
"node_name":"192.168.1.109:7574_solr",
"base_url":"http://192.168.1.109:7574/solr",
"leader":"true"}}}}}}
{code}
Note that the clusterstate.json format was updated to add the extra level for
collection properties. There is no router defined, so the default is the back
compatible "plain". I verified it worked by doing another post.sh *xml and
verified all the docs went to the correct shards.
The bad part: I *think* it's probably luck that the indexes ended up assigned
to the right shards, probably based on the order that I brought them up. They
didn't have any other context to make the decision since we don't store that
info locally yet, and they couldn't match up their info in zookeeper due to the
node naming change.
> SolrCloud upgrade path
> ----------------------
>
> Key: SOLR-4312
> URL: https://issues.apache.org/jira/browse/SOLR-4312
> Project: Solr
> Issue Type: Task
> Components: SolrCloud
> Affects Versions: 4.0, 4.1
> Reporter: Steve Rowe
>
> Upgrading from one SolrCloud version to another needs to be figured out and
> documented.
> Mark Miller wrote on the 4.1 VOTE email on [email protected]:
> {quote}
> One issue that is probably still a problem is that you can't easily upgrade
> form a 4.0 to 4.1 SolrCloud setup in some cases - at least to my knowledge. I
> don't know all the details, but at a minimum, we should probably add an entry
> to changes about what you should do. It may require blowing away your own
> clusterstate.json and re doing your numShards settings, or starting over,
> or…I don't really know. I don't think anyone has tested.
> {quote}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]