Skip to content
Open
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
14 changes: 7 additions & 7 deletions leveldb/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (v *version) release() {
v.s.vmu.Unlock()
}

func (v *version) walkOverlapping(aux tFiles, ikey internalKey, f func(level int, t *tFile) bool, lf func(level int) bool) {
func (v *version) walkOverlapping(aux tFiles, ikey internalKey, f func(level int, t *tFile) bool, lf func() bool) {
ukey := ikey.ukey()

// Aux level.
Expand All @@ -100,7 +100,7 @@ func (v *version) walkOverlapping(aux tFiles, ikey internalKey, f func(level int
}
}

if lf != nil && !lf(-1) {
if lf != nil && !lf() {
return
}
}
Expand All @@ -121,6 +121,10 @@ func (v *version) walkOverlapping(aux tFiles, ikey internalKey, f func(level int
}
}
}

if lf != nil && !lf() {
return
}
} else {
if i := tables.searchMax(v.s.icmp, ikey); i < len(tables) {
t := tables[i]
Expand All @@ -131,10 +135,6 @@ func (v *version) walkOverlapping(aux tFiles, ikey internalKey, f func(level int
}
}
}

if lf != nil && !lf(level) {
return
}
}
}

Expand Down Expand Up @@ -216,7 +216,7 @@ func (v *version) get(aux tFiles, ikey internalKey, ro *opt.ReadOptions, noValue
}

return true
}, func(level int) bool {
}, func() bool {
if zfound {
switch zkt {
case keyTypeVal:
Expand Down