Hacker News new | past | comments | ask | show | jobs | submit login

Thanks.

> LiteFS still maintains serializable isolation within a transaction, although, it has looser guarantees across nodes than something like rqlite.

Picking up a term from the consistency map here [0], what guarantees LiteFS makes across nodes?

[0] https://jepsen.io/consistency




Good question. Right now, LiteFS operates with async replication so its possible to have a transaction written to the primary get lost if the primary fails before it's replicated out. For that short window, you could read a transaction that no longer exists. From that standpoint, I believe it would technically be Read Uncommitted.

However, during normal operation it'll function more like Snapshot Isolation. LiteFS does provide a transaction ID so requests could wait for a replica to catch up before issuing a transaction to get something closer to Serializable.


I think you’re being too harsh on yourself, isolation levels don’t typically account for replication lag and network partitioning into account. For example on MySQL you can have async replication and serializable isolation. Replicas in this mode might never receive updates.


Isolation levels in ACID are typically used for single instances. However, if you're talking about a distributed system then consistency diagram on Jepsen is more applicable[1]. Raft, for example, can ensure read consistency across a cluster by running reads through the consensus mechanism.

LiteFS aims to be the analogue to Postgres/MySQL replication and those generally work great for most applications.

[1]: https://jepsen.io/consistency




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: