Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ibrahim Jarif committed Jan 16, 2020
1 parent ddd0132 commit 5791787
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions levels.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,9 @@ type levelsController struct {
kv *DB

cstatus compactStatus
}

var (
// This is for getting timings between stalls.
lastUnstalled time.Time
)
}

// revertToManifest checks that all necessary table files exist and removes all table files not
// referenced by the manifest. idMap is a set of table file id's that were read from the directory
Expand Down Expand Up @@ -929,7 +926,7 @@ func (s *levelsController) addLevel0Table(t *table.Table) error {
// Stall. Make sure all levels are healthy before we unstall.
var timeStart time.Time
{
s.elog.Printf("STALLED STALLED STALLED: %v\n", time.Since(lastUnstalled))
s.elog.Printf("STALLED STALLED STALLED: %v\n", time.Since(s.lastUnstalled))
s.cstatus.RLock()
for i := 0; i < s.kv.opt.MaxLevels; i++ {
s.elog.Printf("level=%d. Status=%s Size=%d\n",
Expand All @@ -956,7 +953,7 @@ func (s *levelsController) addLevel0Table(t *table.Table) error {
}
{
s.elog.Printf("UNSTALLED UNSTALLED UNSTALLED: %v\n", time.Since(timeStart))
lastUnstalled = time.Now()
s.lastUnstalled = time.Now()
}
}

Expand Down

0 comments on commit 5791787

Please sign in to comment.