Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit eeb4ad5

Browse files
committed
Small comment cleanups
1 parent 1735500 commit eeb4ad5

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

api/routes.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (s *Server) RegisterRoutes() {
5555
ctx.Write(nil)
5656
})
5757

58-
// Miscellaneous MetricTank-only user facing endpoints
58+
// Miscellaneous Metrictank-only user facing endpoints
5959
r.Combo("/showplan", cBody, withOrg, ready, bind(models.GraphiteRender{})).Get(s.showPlan).Post(s.showPlan)
6060
r.Combo("/tags/terms", ready, bind(models.GraphiteTagTerms{})).Get(s.graphiteTagTerms).Post(s.graphiteTagTerms)
6161
r.Combo("/ccache/delete", bind(models.CCacheDelete{})).Post(s.ccacheDelete).Get(s.ccacheDelete)

idx/idx.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ type MetricIndex interface {
102102
// that duplicate entries will be returned.
103103
FindByTag(orgId uint32, query tagquery.Query) []Node
104104

105-
// FindTerms tags a query object and executes the query on the index. The query
105+
// FindTerms takes a query object and executes the query on the index. The query
106106
// is composed of one or many query expressions. From the matching series, a count
107107
// is kept for each value of the requested tags.
108108
// The series are not deduplicated and in certain cases it is possible that some

idx/memory/memory.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -1116,8 +1116,6 @@ func (m *UnpartitionedMemoryIdx) FindTerms(orgID uint32, tags []string, query ta
11161116
return 0, nil
11171117
}
11181118

1119-
queryCtx := NewTagQueryContext(query)
1120-
11211119
needsName := false
11221120
terms := make(map[string]map[string]uint32)
11231121
for _, tag := range tags {
@@ -1127,11 +1125,11 @@ func (m *UnpartitionedMemoryIdx) FindTerms(orgID uint32, tags []string, query ta
11271125
terms[tag] = make(map[string]uint32)
11281126
}
11291127

1128+
queryCtx := NewTagQueryContext(query)
1129+
11301130
m.RLock()
11311131
defer m.RUnlock()
11321132

1133-
// TODO - terms for meta tags?
1134-
11351133
// construct the output slice of idx.Node's such that there is only 1 idx.Node for each path
11361134
resCh := m.idsByTagQuery(orgID, queryCtx)
11371135

0 commit comments

Comments
 (0)