MCPcopy
hub / github.com/perkeep/perkeep / CommitBatch

Method CommitBatch

pkg/sorted/leveldb/leveldb.go:187–198  ·  view source on GitHub ↗
(bm sorted.BatchMutation)

Source from the content-addressed store, hash-verified

185}
186
187func (is *kvis) CommitBatch(bm sorted.BatchMutation) error {
188 b, ok := bm.(*lvbatch)
189 if !ok {
190 return errors.New("invalid batch type")
191 }
192 b.errMu.Lock()
193 defer b.errMu.Unlock()
194 if b.err != nil {
195 return b.err
196 }
197 return is.db.Write(b.batch, is.writeOpts)
198}
199
200func (is *kvis) Close() error {
201 return is.db.Close()

Callers

nothing calls this directly

Calls 3

LockMethod · 0.80
UnlockMethod · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected