From f6763ef593e268359dac9db72a185a6f7320845f Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Tue, 14 Apr 2015 16:27:00 -0700 Subject: [PATCH] Update sample config with topic truncation --- etc/config.sample.toml | 3 +++ messaging/broker.go | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/config.sample.toml b/etc/config.sample.toml index fb27cf34bc8..a2cebfb6754 100644 --- a/etc/config.sample.toml +++ b/etc/config.sample.toml @@ -76,6 +76,9 @@ enabled = false enabled = true # Where the Raft logs are stored. The user running InfluxDB will need read/write access. dir = "/var/opt/influxdb/raft" +truncation-interval = "10m" +max-topic-size = 1073741824 +max-segment-size = 10485760 # Data node configuration. Data nodes are where the time-series data, in the form of # shards, is stored. diff --git a/messaging/broker.go b/messaging/broker.go index 8d9dc310007..54c8ec83195 100644 --- a/messaging/broker.go +++ b/messaging/broker.go @@ -895,8 +895,7 @@ func (t *Topic) Truncate(maxSize int64) (int64, error) { return 0, err } - var totalSize int64 - totalSize, err = segments.Size() + totalSize, err := segments.Size() if err != nil { return 0, err }