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

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.

主站蜘蛛池模板: 建湖县| 麻栗坡县| 天峨县| 宁城县| 松桃| 金沙县| 武宣县| 安图县| 江华| 宜都市| 肃宁县| 孟州市| 绥棱县| 天水市| 蓬安县| 南丰县| 汉阴县| 台山市| 东丰县| 临沧市| 辽阳市| 开江县| 淳安县| 隆安县| 曲周县| 舒城县| 黔南| 宝山区| 胶州市| 隆安县| 琼中| 双辽市| 大宁县| 莱西市| 会昌县| 武陟县| 津市市| 怀集县| 垦利县| 平和县| 阿尔山市|