Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Rename RunAtomically to RunLoggedBatch #57

Merged
merged 1 commit into from
Dec 10, 2019

Conversation

erincandescent
Copy link

The name RunAtomically is misleading - it doesn't give atomicity in the
"traditional" sense. It doesn't provide isolation (so other readers may
observe inconsistent state), and it doesn't provide Read-Your-Writes
consistency. That is to say, assuming the following three operations are
the only operations issued on the database:

  • A write with RunAtomically (which returns an error)
  • A read of the written row
  • A second read of the written row

In some failure cases, both reads may return different values (in
particular, the first read can observe the old value and the second read
the new value), even if all operations were to be performed at QUORUM
consistency

The name RunAtomically is therefore an attractive nuisance. The name
RunLoggedBatch - which takes its name from the underlying Cassandra
operation - means someone is much more likely to peruse the
documentation before attempting to use this Cassandra feature

The name RunAtomically is misleading - it doesn't give atomicity in the
"traditional" sense. It doesn't provide isolation (so other readers may
observe inconsistent state), and it doesn't provide Read-Your-Writes
consistency. That is to say, assuming the following three operations are
the _only_ operations issued on the database:

 * A write with RunAtomically (which returns an error)
 * A read of the written row
 * A second read of the written row

In some failure cases, both reads may return different values (in
particular, the first read can observe the old value and the second read
the new value), even if all operations were to be performed at QUORUM
consistency

The name RunAtomically is therefore an attractive nuisance. The name
RunLoggedBatch - which takes its name from the underlying Cassandra
operation - means someone is much more likely to peruse the
documentation before attempting to use this Cassandra feature
@erincandescent erincandescent merged commit 60ec0b6 into master Dec 10, 2019
@erincandescent erincandescent deleted the rename-runatomically branch December 10, 2019 15:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants