Skip to content

Commit feb4f42

Browse files
committed
change function name for checking if tsdb is closing
Signed-off-by: ilangofman <[email protected]>
1 parent d0a8ea5 commit feb4f42

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pkg/ingester/ingester_v2.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ func (i *Ingester) v2Query(ctx context.Context, req *client.QueryRequest) (*clie
992992

993993
i.metrics.queries.Inc()
994994

995-
if i.checkIfTSDBClosed() {
995+
if i.checkIfAllTSDBClosing() {
996996
return &client.QueryResponse{}, nil
997997
}
998998

@@ -1052,7 +1052,7 @@ func (i *Ingester) v2QueryExemplars(ctx context.Context, req *client.ExemplarQue
10521052

10531053
i.metrics.queries.Inc()
10541054

1055-
if i.checkIfTSDBClosed() {
1055+
if i.checkIfAllTSDBClosing() {
10561056
return &client.ExemplarQueryResponse{}, nil
10571057
}
10581058

@@ -1101,7 +1101,7 @@ func (i *Ingester) v2LabelValues(ctx context.Context, req *client.LabelValuesReq
11011101
return nil, err
11021102
}
11031103

1104-
if i.checkIfTSDBClosed() {
1104+
if i.checkIfAllTSDBClosing() {
11051105
return &client.LabelValuesResponse{}, nil
11061106
}
11071107

@@ -1137,7 +1137,7 @@ func (i *Ingester) v2LabelNames(ctx context.Context, req *client.LabelNamesReque
11371137
return nil, err
11381138
}
11391139

1140-
if i.checkIfTSDBClosed() {
1140+
if i.checkIfAllTSDBClosing() {
11411141
return &client.LabelNamesResponse{}, nil
11421142
}
11431143

@@ -1173,7 +1173,7 @@ func (i *Ingester) v2MetricsForLabelMatchers(ctx context.Context, req *client.Me
11731173
return nil, err
11741174
}
11751175

1176-
if i.checkIfTSDBClosed() {
1176+
if i.checkIfAllTSDBClosing() {
11771177
return &client.MetricsForLabelMatchersResponse{}, nil
11781178
}
11791179

@@ -1244,7 +1244,7 @@ func (i *Ingester) v2UserStats(ctx context.Context, req *client.UserStatsRequest
12441244
return nil, err
12451245
}
12461246

1247-
if i.checkIfTSDBClosed() {
1247+
if i.checkIfAllTSDBClosing() {
12481248
return &client.UserStatsResponse{}, nil
12491249
}
12501250

@@ -1260,7 +1260,7 @@ func (i *Ingester) v2AllUserStats(ctx context.Context, req *client.UserStatsRequ
12601260
i.userStatesMtx.RLock()
12611261
defer i.userStatesMtx.RUnlock()
12621262

1263-
if i.checkIfTSDBClosed() {
1263+
if i.checkIfAllTSDBClosing() {
12641264
return &client.UsersStatsResponse{}, nil
12651265
}
12661266

@@ -1308,7 +1308,7 @@ func (i *Ingester) v2QueryStream(req *client.QueryRequest, stream client.Ingeste
13081308

13091309
i.metrics.queries.Inc()
13101310

1311-
if i.checkIfTSDBClosed() {
1311+
if i.checkIfAllTSDBClosing() {
13121312
return nil
13131313
}
13141314

@@ -1820,7 +1820,7 @@ func (i *Ingester) getMemorySeriesMetric() float64 {
18201820

18211821
count := uint64(0)
18221822

1823-
if i.checkIfTSDBClosed() {
1823+
if i.checkIfAllTSDBClosing() {
18241824
return 0
18251825
}
18261826

@@ -2283,7 +2283,7 @@ func (i *Ingester) getInstanceLimits() *InstanceLimits {
22832283
return l
22842284
}
22852285

2286-
func (i *Ingester) checkIfTSDBClosed() bool {
2286+
func (i *Ingester) checkIfAllTSDBClosing() bool {
22872287
if i.State() == services.Stopping {
22882288
level.Debug(i.logger).Log("msg", "TSDB is unavailable, as the Ingester is in the process of stopping and closing all TSDB")
22892289
return true

0 commit comments

Comments
 (0)