cassandra升級版本選擇

oxoxooxx發表於2011-08-14

本文件假想cassandra版本升級問題,預設使用cassandra增量備份特性的需求,考慮升級最終版本的選擇。
過程:
一、解決此需求至少需要回答的三個問題
二、對比升級到0.8.0和0.7.4對當前系統的影響
三、給出最終結論

一、需要回答的三個問題
1.為什麼要升級到0.8.0?會帶來那些好處?
2.升級到0.8.0是否會帶來潛在的問題?
3.升級到0.7.4是否就已經能夠滿足需求?

二、升級到0.8.0和0.7.4對當前系統的影響
升級到0.8.0是否能夠滿足當前對增量備份的需求,並帶來額外的帶來風險,後續版本有沒有釋出0.8版本的bug
1. 0.8.0與0.7.1及以後版本節點間通訊的協議沒有發生改變,可以做到不停止業務升級。
- Upgrading from version 0.7.1 or later can be done with a rolling
restart, one node at a time. You do not need to bring down the
whole cluster at once.
2. 0.8與0.7客戶端API相容,不需要修改當前客戶端程式碼。
- 0.8 is fully API-compatible with 0.7. You can continue
to use your 0.7 clients.

3. 0.8.0和0.8.1版本中有個bug,把counter column family相關的屬性 replicate_on_write的值預設設定為false,這是不安全的,
建議更新couter column family的定義,修改replicate_on_write的預設值為true,在0.8.2版本中已經做了修改。
Upgrading(0.8.2 --add by wm)

4. 0.8.1引入了一個bug,會導致hintedHandoff不會被髮送到指定的節點。所以強烈建議從0.8.1升級到更高版本。
原文:
This release(0.8.2 --add by wm) fix a regression of 0.8.1 that made hinted handoff being
never delivered. Upgrade from 0.8.1 is thus highly encourage.

5. 0.8版本引入了一個bug,可能導致commit log segment在資料還沒有全部重新整理到檔案被刪除。
Other(0.8.3 --add by wm)
---------
- 0.8.0 and 0.8.1 shipped with a bug that was setting the
replicate_on_write option for counter column families to false (this
option has no effect on non-counter column family). This is an unsafe
default and 0.8.2 correct this, the default for replicate_on_write is
now true. It is advised to update your counter column family definitions
if replicate_on_write was uncorrectly set to false (before or after
upgrade).

-----
- This release fix a regression of 0.8 that can make commit log segment to
be deleted even though not all data it contains has been flushed.
Upgrades from 0.8.* is very much encouraged.
4. 0.8.3引入了一個輕量級更新回退,建議如果從0.8.3之前的版本升級,直接升級到0.8.4.
(0.8.4 --add by wm)
- It also fixes a slight upgrade regression from 0.8.3. It is thus advised
to jump directly to 0.8.4 if upgrading from before 0.8.3.

升級到0.7.4
1. cassandra從0.7.4就提供了增量備份的特性,此特性也是本次升級的主要驅動因素。
2. 0.7.3版本很好的解決了之前版本問題,也是當前使用的版本,0.7.4開始新增了增量備份特性,並且從後續版本也未
暴露於此版本相關的bug問題。

三、最終結論
雖然0.7.3之後到0.8.0版本間新增了如下一些特性,產生了如下的變更,更新相應的功能,
但0.8.0版本在後續版本中暴露出來很多嚴重影響使用的bug,截至當前也需要升級到最新的0.8.4,
更bug發現的規律0.8.4必然會有bug在後續的版本中暴露出來,所以為了保證系統滿足需求並穩定的執行
建議選擇從0.7.3升級到0.7.4作為本次升級方案。

-0.7.3之後到0.8.0版本特性描述
0.7.4 增加了輸出到Pig和從Pig輸入特性
0.7.5 增加了如下變更
Changes
-------
- system_update_column_family no longer snapshots before applying
the schema change. (_update_keyspace never did. _drop_keyspace
and _drop_column_family continue to snapshot.)
- added memtable_flush_queue_size option to cassandra.yaml to
avoid blocking writes when multiple column families (or a colum
family with indexes) are flushed at the same time.
- allow overriding initial_token, storage_port and rpc_port using
system properties
0.8.0 做了如下較大的變動
Upgrading
---------
- Upgrading from version 0.7.1 or later can be done with a rolling
restart, one node at a time. You do not need to bring down the
whole cluster at once.
- Running nodetool drain before shutting down the 0.7 node is
recommended but not required. (Skipping this will result in
replay of entire commitlog, so it will take longer to restart but
is otherwise harmless.)
- 0.8 is fully API-compatible with 0.7. You can continue
to use your 0.7 clients.
- Avro record classes used in map/reduce and Hadoop streaming code have
been removed. Map/reduce can be switched to Thrift by changing
org.apache.cassandra.avro in import statements to
org.apache.cassandra.thrift (no class names change). Streaming support
has been removed for the time being.
- The loadbalance command has been removed from nodetool. For similar
behavior, decommission then rebootstrap with empty initial_token.
- Thrift unframed mode has been removed.

Features
--------
- added CQL client API and JDBC/DBAPI2-compliant drivers for Java and
Python, respectively (see: drivers/ subdirectory and doc/cql)
- added distributed Counters feature;
see
- optional intranode encryption; see comments around 'encryption_options'
in cassandra.yaml
- compaction multithreading and rate-limiting; see
'compaction_multithreading' and 'compaction_throughput_mb_per_sec' in
cassandra.yaml
- cassandra will limit total memtable memory usage to 1/3 of the heap
by default. This can be ajusted or disabled with the
memtable_total_space_in_mb option. The old per-ColumnFamily
throughput, operations, and age settings are still respected but
will be removed in a future major release once we are satisfied that
memtable_total_space_in_mb works adequately.

Tools
-----
- stress and py_stress moved from contrib/ to tools/
- clustertool was removed (see
for examples
of how to script nodetool across the cluster instead)

Other
-----
- In the past, sstable2json would write column names and values as
hex strings, and now creates human readable values based on the
comparator/validator. As a result, JSON dumps created with
older versions of sstable2json are no longer compatible with
json2sstable, and imports must be made with a configuration that
is identical to the export.
- manually-forced compactions ("nodetool compact") will do nothing
if only a single SSTable remains for a ColumnFamily. To force it
to compact that anyway (which will free up space if there are
a lot of expired tombstones), use the new forceUserDefinedCompaction
JMX method on CompactionManager.
- most of contrib/ (which was not part of the binary releases)
has been moved either to examples/ or tools/. We plan to move the
rest for 0.8.1.

JMX
---
- By default, JMX now listens on port 7199.

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23937368/viewspace-1053836/,如需轉載,請註明出處,否則將追究法律責任。

相關文章