MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / write_txn

Method write_txn

atomic-core/src/pristine/txn/pristine.rs:712–718  ·  view source on GitHub ↗

Begin a read-write transaction Only one write transaction can be active at a time. The transaction must be explicitly committed with `commit()` or it will be rolled back when dropped.

(&self)

Source from the content-addressed store, hash-verified

710 /// must be explicitly committed with `commit()` or it will be rolled back
711 /// when dropped.
712 pub fn write_txn(&self) -> PristineResult<WriteTxn<'_>> {
713 // redb 4.2 removed `Durability::Eventual`: every commit is durable
714 // (fsynced) now. The historical write-vs-write_immediate split
715 // therefore collapses onto the same durable commit, which only
716 // strengthens the receipt contract.
717 self.write_txn_with_durability(redb::Durability::Immediate)
718 }
719
720 /// Begin a repair write transaction with immediate durability.
721 ///

Calls 1