Consistency Without Clocks: FaunaDB's Distributed Transaction Protocol
The paper contains this claim:<p>&gt; FaunaDB is an elegant, software-only solution for achieving global ACID transactions, with complete guarantees of serializability and consistency.<p>The paper makes it sound like FaunaDB claims strict serializability for all transactions (like Spanner). This means that if Txn(A) ends before Txn(B) begins, then Txn(B) must be guaranteed to see all data written by Txn(A).<p>However, what if Txn(B) is a read-only transaction? According to the paper, read-only transactions do not contact the global sequencer. Here is an example where an application would fail to read its own writes:<p>1. Txn(A) performs a write W(X) of data on replica R1.<p>2. Txn(A) is assigned a logical timestamp of T1 by the global log.<p>3. Conflict verification is triggered. Replica R1 plays back the global log and verifies there is no conflict.<p>4. Txn(A) completes, since one replica has verified there are no conflicts, and passes control back to the application.<p>5. The application now triggers a read-only Txn(B).<p>6. The coordinator for Txn(B) decides to read replica R2 rather than R1. However, the coordinator is not yet aware that the global log is now at timestamp T1, and it picks T0 as its snapshot timestamp.<p>7. It reads the value of X on replica R2, which does not yet reflect W(X).<p>-- From the application&#x27;s point of view, it did not read its own writes. --<p>I&#x27;m not familiar enough with Fauna DB&#x27;s subtleties to know if this scenario is possible in practice. Perhaps you could comment?<p>I did notice that at the end of the article, the language is carefully phrased to only make the claim of &quot;serializable&quot; (not &quot;strictly serializable&quot;) for read-only transactions. But that would fall short of the guarantees that Spanner and Calvin make, and undermine the &quot;complete guarantees of serializability and consistency&quot;.