From 7787703ca81db34c3681f1c3cf756236359b8007 Mon Sep 17 00:00:00 2001 From: Mark Rushakoff Date: Mon, 8 Aug 2016 08:46:46 -0700 Subject: [PATCH] Ensure gzip writer closed in influx_inspect export Previously, the gzip writer may have had unflushed data when the underlying writer was closed, and the output stream would have been truncated early. --- CHANGELOG.md | 1 + cmd/influx_inspect/export.go | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc2517e6fb4..cfb379292f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -122,6 +122,7 @@ With this release the systemd configuration files for InfluxDB will use the syst - [#7107](https://github.com/influxdata/influxdb/pull/7107): Limit shard concurrency - [#7028](https://github.com/influxdata/influxdb/pull/7028): Do not run continuous queries that have no time span. - [#7025](https://github.com/influxdata/influxdb/issues/7025): Move the CQ interval by the group by offset. +- [#7125](https://github.com/influxdata/influxdb/pull/7125): Ensure gzip writer is closed in influx_inspect export ## v0.13.0 [2016-05-12] diff --git a/cmd/influx_inspect/export.go b/cmd/influx_inspect/export.go index af1ab34c4b4..df8114a7ead 100644 --- a/cmd/influx_inspect/export.go +++ b/cmd/influx_inspect/export.go @@ -97,6 +97,7 @@ func (c *cmdExport) writeFiles() error { defer w.Close() if c.compress { w = gzip.NewWriter(w) + defer w.Close() } // Write out all the DDL