mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-07-08 03:29:01 +00:00
No need to handle freelist as a specical case when freeing a page
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
This commit is contained in:
parent
efc3eb649b
commit
d1cd0deee6
@ -67,9 +67,6 @@ func (t *shared) Free(txid common.Txid, p *common.Page) {
|
||||
allocTxid, ok := t.allocs[p.Id()]
|
||||
if ok {
|
||||
delete(t.allocs, p.Id())
|
||||
} else if p.IsFreelistPage() {
|
||||
// Freelist is always allocated by prior tx.
|
||||
allocTxid = txid - 1
|
||||
}
|
||||
|
||||
for id := p.Id(); id <= p.Id()+common.Pgid(p.Overflow()); id++ {
|
||||
|
Loading…
x
Reference in New Issue
Block a user