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

Method Copyall

internal/freelist/shared.go:207–214  ·  view source on GitHub ↗

Copyall copies a list of all free ids and all pending ids in one sorted list. f.count returns the minimum length required for dst.

(dst []common.Pgid)

Source from the content-addressed store, hash-verified

205// Copyall copies a list of all free ids and all pending ids in one sorted list.
206// f.count returns the minimum length required for dst.
207func (t *shared) Copyall(dst []common.Pgid) {
208 m := make(common.Pgids, 0, t.PendingCount())
209 for _, txp := range t.pendingPageIds() {
210 m = append(m, txp.ids...)
211 }
212 sort.Sort(m)
213 common.Mergepgids(dst, t.freePageIds(), m)
214}
215
216func (t *shared) Reload(p *common.Page) {
217 t.Read(p)

Callers 1

WriteMethod · 0.95

Calls 4

PendingCountMethod · 0.95
pendingPageIdsMethod · 0.95
MergepgidsFunction · 0.92
freePageIdsMethod · 0.65

Tested by

no test coverage detected