From 9e940b95ad4d27efab60d0d49278db5acb2a3b7e Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 31 Aug 2018 14:05:49 -0400 Subject: [PATCH] libs/autofile: bring back loops (#2261) * libs/autofile: bring back loops * changelog, version --- CHANGELOG.md | 8 ++++++++ libs/autofile/autofile.go | 12 +++++++----- libs/autofile/group.go | 14 ++++++++------ version/version.go | 4 ++-- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 364af117c..d3f92f64b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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* diff --git a/libs/autofile/autofile.go b/libs/autofile/autofile.go index 2f1bb4fd5..b00585285 100644 --- a/libs/autofile/autofile.go +++ b/libs/autofile/autofile.go @@ -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 + } } } diff --git a/libs/autofile/group.go b/libs/autofile/group.go index e747f04dd..500bdbc7c 100644 --- a/libs/autofile/group.go +++ b/libs/autofile/group.go @@ -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 + } } } diff --git a/version/version.go b/version/version.go index 04880cfe0..68a9954f0 100644 --- a/version/version.go +++ b/version/version.go @@ -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