MCPcopy
hub / github.com/fagongzi/manba / Commit

Method Commit

pkg/store/txn.go:40–54  ·  view source on GitHub ↗

Commit implements Txn Commit interface.

()

Source from the content-addressed store, hash-verified

38
39// Commit implements Txn Commit interface.
40func (t *slowLogTxn) Commit() (*clientv3.TxnResponse, error) {
41 start := time.Now()
42 resp, err := t.Txn.Commit()
43 t.cancel()
44
45 cost := time.Now().Sub(start)
46 if cost > DefaultSlowRequestTime {
47 log.Warn("slow: txn runs too slow, resp=<%v> cost=<%s> errors:\n %+v",
48 resp,
49 cost,
50 err)
51 }
52
53 return resp, err
54}
55
56func (e *EtcdStore) txn() clientv3.Txn {
57 return newSlowLogTxn(e.rawClient)

Callers 12

RemoveClusterMethod · 0.45
SetIDMethod · 0.45
putMethod · 0.45
putBatchMethod · 0.45
putTTLMethod · 0.45
deleteMethod · 0.45
createIDMethod · 0.45
updateIDMethod · 0.45
updateAPIFunction · 0.45
createClusterFunction · 0.45
updateClusterFunction · 0.45
updateRoutingFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected