Skip to content

Commit

Permalink
Merge pull request #2307 from tendermint/master
Browse files Browse the repository at this point in the history
libs/autofile: bring back loops (#2261)
  • Loading branch information
ebuchman committed Aug 31, 2018
2 parents 5ecdfac + 9e940b9 commit 03afad3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 13 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.23.1

*August 22nd, 2018*

BUG FIXES:
- [libs/autofile] \#2261 Fix log rotation so it actually happens.
- Fixes issues with consensus WAL growing unbounded ala \#2259

## 0.23.0

*August 5th, 2018*
Expand Down
12 changes: 7 additions & 5 deletions libs/autofile/autofile.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ func (af *AutoFile) Close() error {
}

func (af *AutoFile) processTicks() {
select {
case <-af.ticker.C:
af.closeFile()
case <-af.tickerStopped:
return
for {
select {
case <-af.ticker.C:
af.closeFile()
case <-af.tickerStopped:
return
}
}
}

Expand Down
14 changes: 8 additions & 6 deletions libs/autofile/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,14 @@ func (g *Group) Flush() error {
}

func (g *Group) processTicks() {
select {
case <-g.ticker.C:
g.checkHeadSizeLimit()
g.checkTotalSizeLimit()
case <-g.Quit():
return
for {
select {
case <-g.ticker.C:
g.checkHeadSizeLimit()
g.checkTotalSizeLimit()
case <-g.Quit():
return
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ package version
const (
Maj = "0"
Min = "23"
Fix = "0"
Fix = "1"
)

var (
// Version is the current version of Tendermint
// Must be a string because scripts like dist.sh read this file.
Version = "0.23.0"
Version = "0.23.1"

// GitCommit is the current HEAD set using ldflags.
GitCommit string
Expand Down

0 comments on commit 03afad3

Please sign in to comment.