2 ms·
It’s cool to see new storage engines, thanks for sharing. For transaction, how are conflicts on concurrent transaction handled? What’s the ordering? Are you co
by jitl 2y ago
It’s cool to see new storage engines, thanks for sharing.
For transaction, how are conflicts on concurrent transaction handled? What’s the ordering? Are you considering any conditional check operation like compare-and-swap? For example I think Deno KV’s API where each value has a versionstamp and for transactions there’s an operation CHECK(key, versionstamp) that cancels the transaction if key doesn’t have the given versionstamp at the time of transaction.
- alexpadula 2y agoHey! Thank you for the comment. It's first come first serve. If there are say 2 transactions, a and b. If b commits before a, b will supersede a in regards to an atomic bunch(operations in a single unit of work). The way it works is a transaction will block the memtable whilst it completes its operations and its first come first serve based on which commits first (FCFS). I did not want to implement MVCC nor a complex transaction scheme as I designed everything else to be quite simple.