MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / commitTransaction

Method commitTransaction

db.go:363–374  ·  view source on GitHub ↗
(tx *Tx)

Source from the content-addressed store, hash-verified

361}
362
363func (db *DB) commitTransaction(tx *Tx) error {
364 var err error
365 defer func() {
366 if r := recover(); r != nil {
367 err = fmt.Errorf("panic when committing tx, err is %+v", r)
368 }
369 }()
370
371 tx.lock()
372 err = tx.Commit()
373 return err
374}
375
376func (db *DB) writeRequests(reqs []*request) error {
377 var err error

Callers 1

writeRequestsMethod · 0.95

Calls 2

lockMethod · 0.80
CommitMethod · 0.80

Tested by

no test coverage detected