Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/freelist/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,18 @@ func (t *shared) Reload(p *common.Page) {

func (t *shared) NoSyncReload(pgIds common.Pgids) {
// Build a cache of only pending pages.
pcache := make(map[common.Pgid]bool)
pcache := make(map[common.Pgid]struct{})
for _, txp := range t.pending {
for _, pendingID := range txp.ids {
pcache[pendingID] = true
pcache[pendingID] = struct{}{}
}
}

// Check each page in the freelist and build a new available freelist
// with any pages not in the pending lists.
a := []common.Pgid{}
for _, id := range pgIds {
if !pcache[id] {
if _, ok := pcache[id]; !ok {
a = append(a, id)
}
}
Expand Down
Loading