From 6b5b24a3e35d7cea55af4bf6f012287e714f43a7 Mon Sep 17 00:00:00 2001 From: "Jonathan A. Sternberg" Date: Mon, 15 Aug 2016 13:57:05 -0500 Subject: [PATCH] Decrement number of measurements only once when deleting the last series from a measurement --- CHANGELOG.md | 1 + tsdb/meta.go | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 170958adedd..31c6210db00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Bugfixes - [#1834](https://github.com/influxdata/influxdb/issues/1834): Drop time when used as a tag or field key. +- [#7152](https://github.com/influxdata/influxdb/issues/7152): Decrement number of measurements only once when deleting the last series from a measurement. ## v1.0.0 [unreleased] diff --git a/tsdb/meta.go b/tsdb/meta.go index 638997ce084..c121e00c9cb 100644 --- a/tsdb/meta.go +++ b/tsdb/meta.go @@ -225,7 +225,6 @@ func (d *DatabaseIndex) UnassignShard(k string, shardID uint64) { if !ss.measurement.HasSeries() { d.mu.Lock() d.dropMeasurement(ss.measurement.Name) - atomic.AddInt64(&d.stats.NumMeasurements, -1) d.mu.Unlock() }