Book Image

Learning Apache Cassandra

By : Matthew Brown
4 (1)
Book Image

Learning Apache Cassandra

4 (1)
By: Matthew Brown

Overview of this book

Table of Contents (19 chapters)
Learning Apache Cassandra
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Distributed deletion


When we want to delete data from storage, we might assume that Cassandra simply removes the data from disk and forgets that it ever existed. In a non-distributed environment, this approach to deletion would be entirely sufficient, but deletion is a bit more complex in a distributed database like Cassandra. To find out why, let's return to, and modify, our previous scenario with Heather and Charles making concurrent modifications to HappyCorp's user record.

In our modified scenario, Heather will still be updating the location column to contain New York, but Charles will be attempting to delete the contents of that column altogether. As with the original scenario, they'll be making their respective changes at roughly the same time, and our application will issue the UPDATE and DELETE queries at the ONE consistency level. Consider the following sequence of events:

  1. Heather issues a request to update the location value to New York; this is acknowledged by Replica 1.

  2. Charles...