Skip to content

Commit

Permalink
Update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed Apr 14, 2015
1 parent cfb9179 commit b6d68bb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
### Bugfixes
- [#2282](https://github.com/influxdb/influxdb/pull/2282): Use "value" as field name for OpenTSDB input.

## Features
- [#2276](https://github.com/influxdb/influxdb/pull/2276): Broker topic truncation.

## v0.9.0-rc24 [2015-04-13]

### Bugfixes
Expand Down
2 changes: 1 addition & 1 deletion cmd/influxd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const (
DefaultRetentionCheckEnabled = true

// DefaultRetentionCheckPeriod is the period of time between retention policy checks are run
DefaultRetentionCheckPeriod = 30 * time.Minute
DefaultRetentionCheckPeriod = 10 * time.Minute

// DefaultRecomputePreviousN is ???
DefaultContinuousQueryRecomputePreviousN = 2
Expand Down
13 changes: 9 additions & 4 deletions messaging/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,14 @@ func (b *Broker) Open(path string) error {
go func() {
defer b.wg.Done()
tick := time.NewTicker(b.TruncationInterval)
defer tick.Stop()
for {
<-tick.C
b.TruncateTopics()
select {
case <-tick.C:
b.TruncateTopics()
case <-b.done:
return
}
}
}()

Expand Down Expand Up @@ -274,15 +279,15 @@ func (b *Broker) closeTopics() {

// truncateTopics forces topics to truncate such that they are equal to
// or less than the requested size, if possible.
func (b *Broker) TruncateTopics() error {
func (b *Broker) TruncateTopics() {
for _, t := range b.topics {
if n, err := t.Truncate(b.MaxTopicSize); err != nil {
b.Logger.Printf("error truncating topic %s: %s", t.Path(), err.Error())
} else if n > 0 {
b.Logger.Printf("topic %s, %d bytes deleted", t.Path(), n)
}
}
return nil
return
}

// SetMaxIndex sets the highest index applied by the broker.
Expand Down

0 comments on commit b6d68bb

Please sign in to comment.