Switch to golang/dep.
This commit is contained in:
parent
d88554fa92
commit
044d87d96d
239 changed files with 42372 additions and 7011 deletions
9
vendor/github.com/coreos/bbolt/freelist.go
generated
vendored
9
vendor/github.com/coreos/bbolt/freelist.go
generated
vendored
|
@ -132,9 +132,9 @@ func (f *freelist) free(txid txid, p *page) {
|
|||
allocTxid, ok := f.allocs[p.id]
|
||||
if ok {
|
||||
delete(f.allocs, p.id)
|
||||
} else if (p.flags & (freelistPageFlag | metaPageFlag)) != 0 {
|
||||
// Safe to claim txid as allocating since these types are private to txid.
|
||||
allocTxid = txid
|
||||
} else if (p.flags & freelistPageFlag) != 0 {
|
||||
// Freelist is always allocated by prior tx.
|
||||
allocTxid = txid - 1
|
||||
}
|
||||
|
||||
for id := p.id; id <= p.id+pgid(p.overflow); id++ {
|
||||
|
@ -233,6 +233,9 @@ func (f *freelist) freed(pgid pgid) bool {
|
|||
|
||||
// read initializes the freelist from a freelist page.
|
||||
func (f *freelist) read(p *page) {
|
||||
if (p.flags & freelistPageFlag) == 0 {
|
||||
panic(fmt.Sprintf("invalid freelist page: %d, page type is %s", p.id, p.typ()))
|
||||
}
|
||||
// If the page.count is at the max uint16 value (64k) then it's considered
|
||||
// an overflow and the size of the freelist is stored as the first element.
|
||||
idx, count := 0, int(p.count)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue