NewTransaction creates a new transaction. Badger supports concurrent execution of transactions, providing serializable snapshot isolation, avoiding write skews. Badger achieves this by tracking the keys read and at Commit time, ensuring that these read keys weren't concurrently modified by another t
(update bool)
| 757 | // defer txn.Discard() |
| 758 | // // Call various APIs. |
| 759 | func (db *DB) NewTransaction(update bool) *Txn { |
| 760 | return db.newTransaction(update, false) |
| 761 | } |
| 762 | |
| 763 | func (db *DB) newTransaction(update, isManaged bool) *Txn { |
| 764 | if db.opt.ReadOnly && update { |