cassandra升级版本选择

本文档假想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 http://wiki.apache.org/cassandra/Counters
- 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
https://issues.apache.org/jira/browse/CASSANDRA-2607 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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23937368/viewspace-1053836/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值