MCPcopy
hub / github.com/etcd-io/bbolt / nonPhysicalRollback

Method nonPhysicalRollback

tx.go:312–320  ·  view source on GitHub ↗

nonPhysicalRollback is called when user calls Rollback directly, in this case we do not need to reload the free pages from disk.

()

Source from the content-addressed store, hash-verified

310
311// nonPhysicalRollback is called when user calls Rollback directly, in this case we do not need to reload the free pages from disk.
312func (tx *Tx) nonPhysicalRollback() {
313 if tx.db == nil {
314 return
315 }
316 if tx.writable {
317 tx.db.freelist.Rollback(tx.meta.Txid())
318 }
319 tx.close()
320}
321
322// rollback needs to reload the free pages from disk in case some system error happens like fsync error.
323func (tx *Tx) rollback() {

Callers 1

RollbackMethod · 0.95

Calls 3

closeMethod · 0.95
TxidMethod · 0.80
RollbackMethod · 0.65

Tested by

no test coverage detected