Skip to content

Commit

Permalink
fix cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Preetam Jinka committed Feb 22, 2018
1 parent 6905356 commit 8750bb6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lm2.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (c *Collection) readRecord(offset int64) (*record, error) {
}
c.stats.incRecordsRead(1)
c.stats.incCacheMisses(1)

c.cache.push(rec)
return rec, nil
}

Expand All @@ -183,9 +183,6 @@ func (c *Collection) nextRecord(rec *record, level int) (*record, error) {
if err != nil {
return nil, err
}
if level >= 2 {
c.cache.push(rec)
}
return nextRec, nil
}

Expand Down

0 comments on commit 8750bb6

Please sign in to comment.