2016-10-11 18 views
0

范围:如果我mongos 2.6使用带的mongod会发生什么3.0

目前,我正在升级大的MongoDB分片环境从2.6到3.0,继官方文档中提供的建议: https://docs.mongodb.com/v3.0/release-notes/3.0-upgrade/#upgrade-recommendations-and-checklists

在这里面,他们警告我们用下面的注释:

不要升级mongod的情况下,直到您已经升级了所有 的mongos实例后。

但是,他们没有告诉我们这样做的后果是什么,更重要的是,如果发生这种情况如何恢复。

目标:

我们要测试连接到3.0分片环境mongos 2.6和模拟其故障排除。

问:

之前进行(显然在测试环境中),我想知道是否有人曾做过这样的测试,并得到了什么结果。另外,你是如何恢复情况的。

在此先感谢。

回答

0

我已经试过上述合适而恰当的mongod的只是不允许mongos建立连接:

mongos> show tables 
2016-10-17T13:24:00.954+0100 E QUERY [thread1] Error: error: { 
     "$err" : "could not initialize sharding on connection mtk-uat-rs-eu0/mongod.mtkdb413.motortrak.com:28100,mongod.mtkdb413.motortrak.com:28101 :: caused by :: v3.0 mongod is incompatible with v2.6 mongos, a v2.6 mongos may be running in the v3.0 cluster at 192.168.151.28", 
     "code" : 15907, 
     "shard" : "mtk-uat-rs-eu0" 
} : 
[email protected]/mongo/shell/utils.js:25:13 
[email protected]/mongo/shell/query.js:297:1 
[email protected]/mongo/shell/db.js:743:27 
[email protected]/mongo/shell/db.js:789:16 
[email protected]/mongo/shell/db.js:796:16 
[email protected]/mongo/shell/utils.js:753:9 
[email protected]/mongo/shell/utils.js:650:15 
@(shellhelp2):1:1 

mongos> show tables 
2016-10-17T14:20:24.223+0100 E QUERY [thread1] Error: error: { 
     "$err" : "could not initialize sharding on connection mtk-uat-rs-eu0/mongod.mtkdb413.motortrak.com:28100,mongod.mtkdb413.motortrak.com:28101 :: caused by :: v3.0 mongod is incompatible with v2.6 mongos, a v2.6 mongos may be running in the v3.0 cluster at 192.168.151.28", 
     "code" : 15907, 
     "shard" : "mtk-uat-rs-eu0" 
} : 
[email protected]/mongo/shell/utils.js:25:13 
[email protected]/mongo/shell/query.js:297:1 
[email protected]/mongo/shell/db.js:743:27 
[email protected]/mongo/shell/db.js:789:16 
[email protected]/mongo/shell/db.js:796:16 
[email protected]/mongo/shell/utils.js:753:9 
[email protected]/mongo/shell/utils.js:650:15 
@(shellhelp2):1:1 
相关问题