Skip to content

Commit

Permalink
rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
travisjeffery committed Dec 12, 2016
1 parent 50e7538 commit 6a5d11f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions commitlog/commitlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,18 @@ func (l *CommitLog) checkSplit() bool {
}

func (l *CommitLog) split() error {
seg, err := NewSegment(l.Path, l.NewestOffset(), l.MaxSegmentBytes)
segment, err := NewSegment(l.Path, l.NewestOffset(), l.MaxSegmentBytes)
if err != nil {
return err
}
l.mu.Lock()
l.segments = append(l.segments, seg)
segments, err := l.cleaner.Clean(l.segments)
segments := append(l.segments, segment)
segments, err = l.cleaner.Clean(segments)
if err != nil {
return err
}
l.segments = segments
l.mu.Unlock()
l.vActiveSegment.Store(seg)
l.vActiveSegment.Store(segment)
return nil
}

0 comments on commit 6a5d11f

Please sign in to comment.