What is the best way to implement a unique incrementing value (for use as a key or value) with lmdb?
Is there a property if the transaction mechanism I could piggy-back off of to atomically generate my number?
Or should I block writers above mdb_cursor_put, do my lmdb transaction, and unblock?
CJ Ess wrote:
What is the best way to implement a unique incrementing value (for use as a key or value) with lmdb?
Is there a property if the transaction mechanism I could piggy-back off of to atomically generate my number?
Or should I block writers above mdb_cursor_put, do my lmdb transaction, and unblock?
You could probably use the txnid for this, but currently there is no API to return the txnid from a txn.