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:
- Heather issues a request to update the
location
value toNew York
; this is acknowledged by Replica...