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

Function executeDelete

concurrent_test.go:504–520  ·  view source on GitHub ↗
(tx *bolt.Tx, bucket []byte, key []byte)

Source from the content-addressed store, hash-verified

502}
503
504func executeDelete(tx *bolt.Tx, bucket []byte, key []byte) (historyRecord, error) {
505 var rec historyRecord
506
507 b := tx.Bucket(bucket)
508
509 err := b.Delete(key)
510 if err == nil {
511 rec = historyRecord{
512 OperationType: Delete,
513 Bucket: string(bucket),
514 Key: string(key),
515 Txid: tx.ID(),
516 }
517 }
518
519 return rec, err
520}
521
522func randomDurationInRange(min, max time.Duration) time.Duration {
523 d := int64(max) - int64(min)

Callers 1

executeOperationFunction · 0.85

Calls 3

IDMethod · 0.80
BucketMethod · 0.45
DeleteMethod · 0.45

Tested by

no test coverage detected