gkvlite
gkvlite copied to clipboard
Any plans to add transactions?
Transactions (for any combination of reading & writing during the transaction) maintain a consistent view of the DB during some operation (typically upsert-like ones - i.e. read value V under key K, update part of V so, that it's based on its previous value, and finally save V under K).
Having more go routines (or even real threads from a pool) whereas one is a mutator and the others are readers makes transactions a requirement.
If one needs just non-persistent transactions, then synchronization primitives might be enough (though not easy to grasp from the code). But if one expects transactions take longer, then such blocking behavior is not an option and persistent transactions become a requirement.