2016-10-11 19 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 
相關問題