all: remove the remaining mentions of cluster version

This commit is contained in:
Aliaksandr Valialkin 2019-11-21 23:18:22 +02:00
parent 3e9b7addb1
commit 7a4635f853
4 changed files with 7 additions and 12 deletions

View file

@ -288,7 +288,6 @@ func marshalMetricTagsFast(dst []byte, tags []storage.Tag) []byte {
} }
func marshalMetricNameSorted(dst []byte, mn *storage.MetricName) []byte { func marshalMetricNameSorted(dst []byte, mn *storage.MetricName) []byte {
// Do not marshal AccountID and ProjectID, since they are unused.
dst = marshalBytesFast(dst, mn.MetricGroup) dst = marshalBytesFast(dst, mn.MetricGroup)
sortMetricTags(mn.Tags) sortMetricTags(mn.Tags)
dst = marshalMetricTagsFast(dst, mn.Tags) dst = marshalMetricTagsFast(dst, mn.Tags)

View file

@ -456,8 +456,6 @@ func TestIndexDBOpenClose(t *testing.T) {
} }
func TestIndexDB(t *testing.T) { func TestIndexDB(t *testing.T) {
const accountsCount = 3
const projectsCount = 2
const metricGroups = 10 const metricGroups = 10
t.Run("serial", func(t *testing.T) { t.Run("serial", func(t *testing.T) {
@ -486,7 +484,7 @@ func TestIndexDB(t *testing.T) {
if err := testIndexDBBigMetricName(db); err != nil { if err := testIndexDBBigMetricName(db); err != nil {
t.Fatalf("unexpected error: %s", err) t.Fatalf("unexpected error: %s", err)
} }
mns, tsids, err := testIndexDBGetOrCreateTSIDByName(db, accountsCount, projectsCount, metricGroups) mns, tsids, err := testIndexDBGetOrCreateTSIDByName(db, metricGroups)
if err != nil { if err != nil {
t.Fatalf("unexpected error: %s", err) t.Fatalf("unexpected error: %s", err)
} }
@ -547,7 +545,7 @@ func TestIndexDB(t *testing.T) {
ch <- err ch <- err
return return
} }
mns, tsid, err := testIndexDBGetOrCreateTSIDByName(db, accountsCount, projectsCount, metricGroups) mns, tsid, err := testIndexDBGetOrCreateTSIDByName(db, metricGroups)
if err != nil { if err != nil {
ch <- err ch <- err
return return
@ -648,7 +646,7 @@ func testIndexDBBigMetricName(db *indexDB) error {
return nil return nil
} }
func testIndexDBGetOrCreateTSIDByName(db *indexDB, accountsCount, projectsCount, metricGroups int) ([]MetricName, []TSID, error) { func testIndexDBGetOrCreateTSIDByName(db *indexDB, metricGroups int) ([]MetricName, []TSID, error) {
// Create tsids. // Create tsids.
var mns []MetricName var mns []MetricName
var tsids []TSID var tsids []TSID

View file

@ -643,7 +643,7 @@ func (s *Storage) SearchTagValues(tagKey []byte, maxTagValues int) ([]string, er
return s.idb().SearchTagValues(tagKey, maxTagValues) 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) { func (s *Storage) SearchTagEntries(maxTagKeys, maxTagValues int) ([]TagEntry, error) {
idb := s.idb() idb := s.idb()
keys, err := idb.SearchTagKeys(maxTagKeys) keys, err := idb.SearchTagKeys(maxTagKeys)

View file

@ -14,7 +14,7 @@ import (
// grouping of related metrics. // grouping of related metrics.
// It is OK if their meaning differ from their naming. // It is OK if their meaning differ from their naming.
type TSID struct { 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. // MetricGroupID must be unique.
// //
@ -29,8 +29,7 @@ type TSID struct {
// memory_usage{datacenter="foo2", job="bar1", instance="baz2:1234"} // memory_usage{datacenter="foo2", job="bar1", instance="baz2:1234"}
MetricGroupID uint64 MetricGroupID uint64
// JobID is the id of an individual job (aka service) // JobID is the id of an individual job (aka service).
// for the given project.
// //
// JobID must be unique. // JobID must be unique.
// //
@ -38,8 +37,7 @@ type TSID struct {
// See https://prometheus.io/docs/concepts/jobs_instances/ for details. // See https://prometheus.io/docs/concepts/jobs_instances/ for details.
JobID uint32 JobID uint32
// InstanceID is the id of an instance (aka process) // InstanceID is the id of an instance (aka process).
// for the given project.
// //
// InstanceID must be unique. // InstanceID must be unique.
// //