CacheCloud從3月17日正式開源,雖然在我們内部一直運作正常,開源後雖然沒有大的問題,但還是遇到很多小問題,比如作業系統相容性問題,資料庫版本問題,一些配置不靈活等等問題。
期間感謝大家的回報,現在将CacheCloud修複的問題列出來,希望将來這個能一直更新下去,有問題去github issue一下。
搜狐視訊Redis雲平台CacheCloud的github首頁:
https://github.com/sohutv/cachecloud 歡迎關注、star、拍磚




,Q群:534429768
2016-03-18:添加機器後不能立刻出現在機器清單中
1. 表現:添加機器後不能立刻出現在機器清單中。
2. 原因:最早的版本必須等到quartz收集完機器資訊才顯示。
3. 解決:添加機器資訊後,立即顯示在清單中,不過機器資訊顯示收集中。
https://github.com/sohutv/cachecloud/issues/42016-03-19:sentinel必須寫死在配置中
1. 表現:sentinel清單必須寫死在配置中。
2. 原因:曆史原因造成,cachecloud在内部用了固定的三台機器,為了偷懶。
3. 解決:sentinel可以靈活配置,具體可以看:
https://github.com/sohutv/cachecloud/issues/4 https://github.com/sohutv/cachecloud/commit/e596d4326fac911f4172158de1ae03abb14f98302016-03-21:儲存機器收集資訊報錯
1. 表現:儲存機器收集資訊,提示和virtual相關的報錯
2. 原因:mysql5.7中virtual是關鍵字
3. 解決:在mybatis的mapper中相容
具體參考:
https://github.com/sohutv/cachecloud/commit/d6e1ffb1ebd9bd1df9b55535da9fec70001675592016-03-28:修複redis cluster節點都在一台機器時,機器挂掉後,無法顯示運維界面
1. 表現:應用運維界面為空白,收到空指針
2. 原因:所有執行個體都挂了,無法擷取slot資訊,造成空指針
3. 解決:如果出現,暫時先傳回空的Map
https://github.com/sohutv/cachecloud/commit/b5f8d7dbc78df4354f995c61b6513a6f6188e8092016-03-29:修複機器資訊統計在centos7 debian等作業系統失效
1. 表現:收集機器資訊報錯,
2. 原因:centos 各個版本, redhat, ubuntu執行top對應的資訊不同,解析方法沒有相容造成。
3. 解決:使用正規表達式解決。
2016-03-31:啟動腳本問題。
問題: /etc/init.d/cachecloud-web start 啟動失敗
狀态:已經修複,詳見:
https://github.com/sohutv/cachecloud/commit/6ba783a2367aec69d6c1abcd1c65b592a7274cca解決方法:使用nohup java形式啟動,使用kill pid關閉,詳見start.sh和stop.sh
2016-04-03: 修複機器更新異常。
問題:cachecloud背景機器管理中,修改機器資訊提示更新失敗。
https://github.com/sohutv/cachecloud/commit/ad0d54bbe0a24f3f1eb94b96e34168b0e2d65f61解決方法:添加和更新用一個方法實作。
2016-04-07: 修複應用運維界面,運維後頁面不重新整理
問題:應用運維界面在執行failover, add slave等操作後,頁面重新整理不太正常
狀态:已經修複。
解決方法:js的頁面重新整理使用錯誤,雖然比較好解決,但是這個不重新整理會對叢集節點關系産生錯覺(之前一直是手動重新整了解決的).
詳見:
https://github.com/sohutv/cachecloud/commit/607dc8d254329f71666e6fc34e5c2a0b96cd4dd72016-04-07: 去掉InstanceInfo中的parentId(對應instance_info表)
問題:parentId起初設計是代表目前節點是否為master(parentId>0代表slave, parentId=0代表master),但是這個設計是有問題的,因為後期在運維過程中,主從關系關系會發生變化,需要維護parentId這個字段的一緻性。
狀态:已經修複
解決方法:去掉parentId,完全使用實時主從關系。
https://github.com/sohutv/cachecloud/commit/dccb8b2304977bd462fd637c9f1571f04577804b2016-04-07: JedisCluster初始化不需要指定主從關系
問題:JedisCluster初始化用到的nodeList是不需要指定主從關系的,具體可以參考Jedis中JedisClusterConnectionHandler的initializeSlotsCache方法,它會自動發現叢集資訊。
private void initializeSlotsCache(Set<HostAndPort> startNodes, GenericObjectPoolConfig poolConfig) {
for (HostAndPort hostAndPort : startNodes) {
Jedis jedis = new Jedis(hostAndPort.getHost(), hostAndPort.getPort());
try {
cache.discoverClusterNodesAndSlots(jedis);
break;
} catch (JedisConnectionException e) {
// try next nodes
} finally {
if (jedis != null) {
jedis.close();
}
}
}
for (HostAndPort node : startNodes) {
cache.setNodeIfNotExist(node);
}
}
https://github.com/sohutv/cachecloud/commit/4b8c4ecf335dc024637f3b69b5adc2ce4e0828c4