官术网_书友最值得收藏!

Lightweight transactions

As discussed before, Cassandra provides eventual consistency rather than immediate consistency, which means data written will eventually be consistent across multiple replicas of the data. This has implications on the data returned by read queries. There is a possibility that reads could return stale data depending on how writes and reads are configured (the consistency levels at which both queries are performed). Strong consistency, which means reading the most recently written value, can be achieved using quorum reads and writes. But what if strong consistency is not enough? What if we have some operations to perform in sequence that must not be interrupted by others, that is, we must perform them one at a time, or make sure that any that we do run concurrently get the same results as if they really were processed independently. Cassandra provides lightweight transactions with linearizable consistency to ensure a transaction isolation level similar to the serializable level offered by RDBMSs. They are also known as compare and set transactions. You can use lightweight transactions instead of durable transactions with eventual/tunable consistency for situations that require the nodes in the distribution system to agree on changes to the data.

主站蜘蛛池模板: 田林县| 都匀市| 南投市| 曲靖市| 台前县| 静宁县| 宜阳县| 镇雄县| 尉犁县| 武宁县| 鲁山县| 文登市| 宜宾市| 汾阳市| 乐业县| 新丰县| 曲松县| 奇台县| 宁河县| 铜陵市| 清水河县| 神农架林区| 青海省| 怀安县| 苏尼特左旗| 阿拉善盟| 吴旗县| 嘉鱼县| 平湖市| 张家港市| 哈尔滨市| 东城区| 曲周县| 洛隆县| 驻马店市| 神池县| 苍梧县| 肥东县| 民丰县| 武宁县| 晋中市|