From 7a4635f8539fa7d97dfbb295862c4360fdbcd48b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 21 Nov 2019 23:18:22 +0200 Subject: [PATCH] all: remove the remaining mentions of cluster version --- app/vmselect/promql/timeseries.go | 1 - lib/storage/index_db_test.go | 8 +++----- lib/storage/storage.go | 2 +- lib/storage/tsid.go | 8 +++----- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/app/vmselect/promql/timeseries.go b/app/vmselect/promql/timeseries.go index f40907cc1..a48089b74 100644 --- a/app/vmselect/promql/timeseries.go +++ b/app/vmselect/promql/timeseries.go @@ -288,7 +288,6 @@ func marshalMetricTagsFast(dst []byte, tags []storage.Tag) []byte { } func marshalMetricNameSorted(dst []byte, mn *storage.MetricName) []byte { - // Do not marshal AccountID and ProjectID, since they are unused. dst = marshalBytesFast(dst, mn.MetricGroup) sortMetricTags(mn.Tags) dst = marshalMetricTagsFast(dst, mn.Tags) diff --git a/lib/storage/index_db_test.go b/lib/storage/index_db_test.go index c76a117c2..2dc3e6084 100644 --- a/lib/storage/index_db_test.go +++ b/lib/storage/index_db_test.go @@ -456,8 +456,6 @@ func TestIndexDBOpenClose(t *testing.T) { } func TestIndexDB(t *testing.T) { - const accountsCount = 3 - const projectsCount = 2 const metricGroups = 10 t.Run("serial", func(t *testing.T) { @@ -486,7 +484,7 @@ func TestIndexDB(t *testing.T) { if err := testIndexDBBigMetricName(db); err != nil { t.Fatalf("unexpected error: %s", err) } - mns, tsids, err := testIndexDBGetOrCreateTSIDByName(db, accountsCount, projectsCount, metricGroups) + mns, tsids, err := testIndexDBGetOrCreateTSIDByName(db, metricGroups) if err != nil { t.Fatalf("unexpected error: %s", err) } @@ -547,7 +545,7 @@ func TestIndexDB(t *testing.T) { ch <- err return } - mns, tsid, err := testIndexDBGetOrCreateTSIDByName(db, accountsCount, projectsCount, metricGroups) + mns, tsid, err := testIndexDBGetOrCreateTSIDByName(db, metricGroups) if err != nil { ch <- err return @@ -648,7 +646,7 @@ func testIndexDBBigMetricName(db *indexDB) error { return nil } -func testIndexDBGetOrCreateTSIDByName(db *indexDB, accountsCount, projectsCount, metricGroups int) ([]MetricName, []TSID, error) { +func testIndexDBGetOrCreateTSIDByName(db *indexDB, metricGroups int) ([]MetricName, []TSID, error) { // Create tsids. var mns []MetricName var tsids []TSID diff --git a/lib/storage/storage.go b/lib/storage/storage.go index 080254cbf..bfd73989e 100644 --- a/lib/storage/storage.go +++ b/lib/storage/storage.go @@ -643,7 +643,7 @@ func (s *Storage) SearchTagValues(tagKey []byte, maxTagValues int) ([]string, er return s.idb().SearchTagValues(tagKey, maxTagValues) } -// SearchTagEntries returns a list of (tagName -> tagValues) for (accountID, projectID). +// SearchTagEntries returns a list of (tagName -> tagValues) func (s *Storage) SearchTagEntries(maxTagKeys, maxTagValues int) ([]TagEntry, error) { idb := s.idb() keys, err := idb.SearchTagKeys(maxTagKeys) diff --git a/lib/storage/tsid.go b/lib/storage/tsid.go index 7e3904e9a..42b9e3ccd 100644 --- a/lib/storage/tsid.go +++ b/lib/storage/tsid.go @@ -14,7 +14,7 @@ import ( // grouping of related metrics. // It is OK if their meaning differ from their naming. type TSID struct { - // MetricGroupID is the id of metric group inside the given project. + // MetricGroupID is the id of metric group. // // MetricGroupID must be unique. // @@ -29,8 +29,7 @@ type TSID struct { // memory_usage{datacenter="foo2", job="bar1", instance="baz2:1234"} MetricGroupID uint64 - // JobID is the id of an individual job (aka service) - // for the given project. + // JobID is the id of an individual job (aka service). // // JobID must be unique. // @@ -38,8 +37,7 @@ type TSID struct { // See https://prometheus.io/docs/concepts/jobs_instances/ for details. JobID uint32 - // InstanceID is the id of an instance (aka process) - // for the given project. + // InstanceID is the id of an instance (aka process). // // InstanceID must be unique. //