Skip to content

Commit

Permalink
unify variable name style (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngaut authored and coocood committed Feb 19, 2019
1 parent b35cc64 commit 8d985f8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,8 @@ func (db *DB) calculateSize() {

}

func (db *DB) updateSize(lc *y.Closer) {
defer lc.Done()
func (db *DB) updateSize(c *y.Closer) {
defer c.Done()

metricsTicker := time.NewTicker(time.Minute)
defer metricsTicker.Stop()
Expand All @@ -762,7 +762,7 @@ func (db *DB) updateSize(lc *y.Closer) {
select {
case <-metricsTicker.C:
db.calculateSize()
case <-lc.HasBeenClosed():
case <-c.HasBeenClosed():
return
}
}
Expand Down Expand Up @@ -804,14 +804,14 @@ func (db *DB) RunValueLogGC(discardRatio float64) error {
// Find head on disk
headKey := y.KeyWithTs(head, math.MaxUint64)
// Need to pass with timestamp, lsm get removes the last 8 bytes and compares key
val, err := db.lc.get(headKey)
vs, err := db.lc.get(headKey)
if err != nil {
return errors.Wrap(err, "Retrieving head from on-disk LSM")
}

var head valuePointer
if len(val.Value) > 0 {
head.Decode(val.Value)
if len(vs.Value) > 0 {
head.Decode(vs.Value)
}

// Pick a log file and run GC
Expand Down

0 comments on commit 8d985f8

Please sign in to comment.