4 ms·
How does FaunaDB guarantee that all partitions of a transaction commit or abort? The Calvin paper just says "see here for our distributed pessimistic locks that
by shub 9y ago
How does FaunaDB guarantee that all partitions of a transaction commit or abort? The Calvin paper just says "see here for our distributed pessimistic locks that make this not a problem" but if FaunaDB uses oplocks then that doesn't apply.
- freels 9y agoIn FaunaDB all transaction resolution is deterministic. Once global log order is determined, partitions will wait for the transaction inputs at the correct version and will each independently come up with an identical result.
- shub 9y agoSo the input log isn't partitioned? I'm going off of https://fauna.com/blog/consistent-transactions-in-a-globally-distributed-database https://fauna.com/blog/consistent-transactions-in-a-globally... which states > Each database has a single partitioned RAFT-replicated log that is used to derive a total order of all transaction effects, and that handles all cross-region network communication. But if each partition knows about all the reads in a transaction and verifies all the timestamps, that sounds workable. Not that I'm in any way qualified to pass judgment on something like this, but I feel like I have a little bit of understanding. Overall it sounds really cool and the idea of agreeing on inputs instead of outputs is tremendously clever.
- freels 9y agoAdmittedly, the specific mechanics of how the log interacts with data partitions was glossed over a bit in that post. However, to answer your question, the input log is partitioned: Transactions for each epoch are striped across the log partitions. A data partition will need to read a batch from each log partition in order to be able to process the transactions for any given epoch.