We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c0cffc commit dea24e9Copy full SHA for dea24e9
internal/freelist/shared.go
@@ -220,18 +220,18 @@ func (t *shared) Reload(p *common.Page) {
220
221
func (t *shared) NoSyncReload(pgIds common.Pgids) {
222
// Build a cache of only pending pages.
223
- pcache := make(map[common.Pgid]bool)
+ pcache := make(map[common.Pgid]struct{})
224
for _, txp := range t.pending {
225
for _, pendingID := range txp.ids {
226
- pcache[pendingID] = true
+ pcache[pendingID] = struct{}{}
227
}
228
229
230
// Check each page in the freelist and build a new available freelist
231
// with any pages not in the pending lists.
232
a := []common.Pgid{}
233
for _, id := range pgIds {
234
- if !pcache[id] {
+ if _, ok := pcache[id]; !ok {
235
a = append(a, id)
236
237
0 commit comments