simplify code

pull/9441/head
Stuart Carnie 2018-02-14 06:55:48 -07:00
parent 56b4a91acf
commit 6e47ff8d7f
1 changed files with 1 additions and 9 deletions

View File

@ -1900,15 +1900,7 @@ type compactionStrategy struct {
// Apply concurrently compacts all the groups in a compaction strategy.
func (s *compactionStrategy) Apply() {
start := time.Now()
var wg sync.WaitGroup
wg.Add(1)
go func() {
defer wg.Done()
s.compactGroup()
}()
wg.Wait()
s.compactGroup()
atomic.AddInt64(s.durationStat, time.Since(start).Nanoseconds())
}