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

Method release

internal/freelist/shared.go:160–171  ·  view source on GitHub ↗
(txid common.Txid)

Source from the content-addressed store, hash-verified

158}
159
160func (t *shared) release(txid common.Txid) {
161 m := make(common.Pgids, 0)
162 for tid, txp := range t.pending {
163 if tid <= txid {
164 // Move transaction's pending pages to the available freelist.
165 // Don't remove from the cache since the page is still free.
166 m = append(m, txp.ids...)
167 delete(t.pending, tid)
168 }
169 }
170 t.mergeSpans(m)
171}
172
173func (t *shared) releaseRange(begin, end common.Txid) {
174 if begin > end {

Callers 1

ReleasePendingPagesMethod · 0.95

Calls 1

mergeSpansMethod · 0.65

Tested by

no test coverage detected