From 00cb630dbcaed537ade55e0caf85ffa39f83efee Mon Sep 17 00:00:00 2001 From: Abirdcfly Date: Tue, 30 Aug 2022 18:06:14 +0800 Subject: [PATCH] chore: remove duplicate word in comments Signed-off-by: Abirdcfly --- examples/dashboards/overview.json | 4 ++-- examples/dashboards/query-frontend.json | 2 +- examples/dashboards/query.json | 10 +++++----- internal/cortex/chunk/schema.go | 6 +++--- internal/cortex/querier/batch/stream.go | 2 +- internal/cortex/ring/kv/client.go | 2 +- internal/cortex/ring/kv/etcd/etcd.go | 2 +- mixin/dashboards/query-frontend.libsonnet | 2 +- mixin/dashboards/query.libsonnet | 14 +++++++------- pkg/receive/handler.go | 2 +- pkg/server/http/option.go | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/examples/dashboards/overview.json b/examples/dashboards/overview.json index f6ffd42540..07357e6339 100644 --- a/examples/dashboards/overview.json +++ b/examples/dashboards/overview.json @@ -126,7 +126,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "Shows ratio of errors compared to the the total number of handled requests against /query.", + "description": "Shows ratio of errors compared to the total number of handled requests against /query.", "fill": 10, "id": 2, "legend": { @@ -431,7 +431,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "Shows ratio of errors compared to the the total number of handled requests against /query_range.", + "description": "Shows ratio of errors compared to the total number of handled requests against /query_range.", "fill": 10, "id": 5, "legend": { diff --git a/examples/dashboards/query-frontend.json b/examples/dashboards/query-frontend.json index 38d9395f15..48421563bb 100644 --- a/examples/dashboards/query-frontend.json +++ b/examples/dashboards/query-frontend.json @@ -215,7 +215,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "Shows ratio of errors compared to the the total number of handled requests against Query Frontend.", + "description": "Shows ratio of errors compared to the total number of handled requests against Query Frontend.", "fill": 10, "id": 3, "legend": { diff --git a/examples/dashboards/query.json b/examples/dashboards/query.json index 4545b2551a..1b704ab4c9 100644 --- a/examples/dashboards/query.json +++ b/examples/dashboards/query.json @@ -118,7 +118,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "Shows ratio of errors compared to the the total number of handled requests against /query.", + "description": "Shows ratio of errors compared to the total number of handled requests against /query.", "fill": 10, "id": 2, "legend": { @@ -423,7 +423,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "Shows ratio of errors compared to the the total number of handled requests against /query_range.", + "description": "Shows ratio of errors compared to the total number of handled requests against /query_range.", "fill": 10, "id": 5, "legend": { @@ -780,7 +780,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "Shows ratio of errors compared to the the total number of handled requests from other queriers.", + "description": "Shows ratio of errors compared to the total number of handled requests from other queriers.", "fill": 10, "id": 8, "legend": { @@ -1137,7 +1137,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "Shows ratio of errors compared to the the total number of handled requests from other queriers.", + "description": "Shows ratio of errors compared to the total number of handled requests from other queriers.", "fill": 10, "id": 11, "legend": { @@ -1422,7 +1422,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "Shows ratio of failures compared to the the total number of executed DNS lookups.", + "description": "Shows ratio of failures compared to the total number of executed DNS lookups.", "fill": 10, "id": 14, "legend": { diff --git a/internal/cortex/chunk/schema.go b/internal/cortex/chunk/schema.go index 3107f778a5..ef6bc0ca03 100644 --- a/internal/cortex/chunk/schema.go +++ b/internal/cortex/chunk/schema.go @@ -117,19 +117,19 @@ type IndexEntry struct { type schemaBucketsFunc func(from, through model.Time, userID string) []Bucket -// baseSchema implements BaseSchema given a bucketing function and and set of range key callbacks +// baseSchema implements BaseSchema given a bucketing function and set of range key callbacks type baseSchema struct { buckets schemaBucketsFunc entries baseEntries } -// storeSchema implements StoreSchema given a bucketing function and and set of range key callbacks +// storeSchema implements StoreSchema given a bucketing function and set of range key callbacks type storeSchema struct { baseSchema entries storeEntries } -// seriesStoreSchema implements SeriesStoreSchema given a bucketing function and and set of range key callbacks +// seriesStoreSchema implements SeriesStoreSchema given a bucketing function and set of range key callbacks type seriesStoreSchema struct { baseSchema entries seriesStoreEntries diff --git a/internal/cortex/querier/batch/stream.go b/internal/cortex/querier/batch/stream.go index ec48a4bade..bfccfee82c 100644 --- a/internal/cortex/querier/batch/stream.go +++ b/internal/cortex/querier/batch/stream.go @@ -54,7 +54,7 @@ func mergeStreams(left, right batchStream, result batchStream, size int) batchSt checkForFullBatch := func() { if b.Index == size { // The batch reached it intended size. - // Add another batch the the result + // Add another batch the result // and use it for further appending. // The Index is the place at which new sample diff --git a/internal/cortex/ring/kv/client.go b/internal/cortex/ring/kv/client.go index da1d2a9a65..70ec722260 100644 --- a/internal/cortex/ring/kv/client.go +++ b/internal/cortex/ring/kv/client.go @@ -86,7 +86,7 @@ func (cfg *Config) RegisterFlagsWithPrefix(flagsPrefix, defaultPrefix string, f // Client is a high-level client for key-value stores (such as Etcd and // Consul) that exposes operations such as CAS and Watch which take callbacks. // It also deals with serialisation by using a Codec and having a instance of -// the the desired type passed in to methods ala json.Unmarshal. +// the desired type passed in to methods ala json.Unmarshal. type Client interface { // List returns a list of keys under the given prefix. Returned keys will // include the prefix. diff --git a/internal/cortex/ring/kv/etcd/etcd.go b/internal/cortex/ring/kv/etcd/etcd.go index 0ab442e004..f3434f24a2 100644 --- a/internal/cortex/ring/kv/etcd/etcd.go +++ b/internal/cortex/ring/kv/etcd/etcd.go @@ -177,7 +177,7 @@ func (c *Client) CAS(ctx context.Context, key string, f func(in interface{}) (ou lastErr = err continue } - // result is not Succeeded if the the comparison was false, meaning if the modify indexes did not match. + // result is not Succeeded if the comparison was false, meaning if the modify indexes did not match. if !result.Succeeded { level.Debug(c.logger).Log("msg", "failed to CAS, revision and version did not match in etcd", "key", key, "revision", revision) continue diff --git a/mixin/dashboards/query-frontend.libsonnet b/mixin/dashboards/query-frontend.libsonnet index af19c8e46d..9d2004a303 100644 --- a/mixin/dashboards/query-frontend.libsonnet +++ b/mixin/dashboards/query-frontend.libsonnet @@ -27,7 +27,7 @@ local utils = import '../lib/utils.libsonnet'; g.httpQpsPanel('thanos_query_frontend_queries_total', queryFrontendOpSelector, thanos.queryFrontend.dashboard.dimensions) ) .addPanel( - g.panel('Errors', 'Shows ratio of errors compared to the the total number of handled requests against Query Frontend.') + + g.panel('Errors', 'Shows ratio of errors compared to the total number of handled requests against Query Frontend.') + g.httpErrPanel('http_requests_total', queryFrontendHandlerSelector, thanos.queryFrontend.dashboard.dimensions) ) .addPanel( diff --git a/mixin/dashboards/query.libsonnet b/mixin/dashboards/query.libsonnet index 9a42835b78..a9bf0d4603 100644 --- a/mixin/dashboards/query.libsonnet +++ b/mixin/dashboards/query.libsonnet @@ -25,7 +25,7 @@ local utils = import '../lib/utils.libsonnet'; g.httpQpsPanel('http_requests_total', queryHandlerSelector, thanos.query.dashboard.dimensions) ) .addPanel( - g.panel('Errors', 'Shows ratio of errors compared to the the total number of handled requests against /query.') + + g.panel('Errors', 'Shows ratio of errors compared to the total number of handled requests against /query.') + g.httpErrPanel('http_requests_total', queryHandlerSelector, thanos.query.dashboard.dimensions) ) .addPanel( @@ -40,7 +40,7 @@ local utils = import '../lib/utils.libsonnet'; g.httpQpsPanel('http_requests_total', queryRangeHandlerSelector, thanos.query.dashboard.dimensions) ) .addPanel( - g.panel('Errors', 'Shows ratio of errors compared to the the total number of handled requests against /query_range.') + + g.panel('Errors', 'Shows ratio of errors compared to the total number of handled requests against /query_range.') + g.httpErrPanel('http_requests_total', queryRangeHandlerSelector, thanos.query.dashboard.dimensions) ) .addPanel( @@ -55,7 +55,7 @@ local utils = import '../lib/utils.libsonnet'; g.grpcRequestsPanel('grpc_client_handled_total', grpcUnarySelector, thanos.query.dashboard.dimensions) ) .addPanel( - g.panel('Errors', 'Shows ratio of errors compared to the the total number of handled requests from other queriers.') + + g.panel('Errors', 'Shows ratio of errors compared to the total number of handled requests from other queriers.') + g.grpcErrorsPanel('grpc_client_handled_total', grpcUnarySelector, thanos.query.dashboard.dimensions) ) .addPanel( @@ -70,7 +70,7 @@ local utils = import '../lib/utils.libsonnet'; g.grpcRequestsPanel('grpc_client_handled_total', grpcServerStreamSelector, thanos.query.dashboard.dimensions) ) .addPanel( - g.panel('Errors', 'Shows ratio of errors compared to the the total number of handled requests from other queriers.') + + g.panel('Errors', 'Shows ratio of errors compared to the total number of handled requests from other queriers.') + g.grpcErrorsPanel('grpc_client_handled_total', grpcServerStreamSelector, thanos.query.dashboard.dimensions) ) .addPanel( @@ -88,7 +88,7 @@ local utils = import '../lib/utils.libsonnet'; ) ) .addPanel( - g.panel('Errors', 'Shows ratio of failures compared to the the total number of executed DNS lookups.') + + g.panel('Errors', 'Shows ratio of failures compared to the total number of executed DNS lookups.') + g.qpsErrTotalPanel( 'thanos_query_store_apis_dns_failures_total{%s}' % thanos.query.dashboard.selector, 'thanos_query_store_apis_dns_lookups_total{%s}' % thanos.query.dashboard.selector, @@ -108,7 +108,7 @@ local utils = import '../lib/utils.libsonnet'; g.addDashboardLink(thanos.query.title) ) .addPanel( - g.panel('Requests Errors', 'Shows ratio of errors compared to the the total number of handled requests against /query.') + + g.panel('Requests Errors', 'Shows ratio of errors compared to the total number of handled requests against /query.') + g.httpErrPanel('http_requests_total', utils.joinLabels([thanos.dashboard.overview.selector, 'handler="query"']), thanos.dashboard.overview.dimensions) + g.addDashboardLink(thanos.query.title) ) @@ -132,7 +132,7 @@ local utils = import '../lib/utils.libsonnet'; g.addDashboardLink(thanos.query.title) ) .addPanel( - g.panel('Requests Errors', 'Shows ratio of errors compared to the the total number of handled requests against /query_range.') + + g.panel('Requests Errors', 'Shows ratio of errors compared to the total number of handled requests against /query_range.') + g.httpErrPanel('http_requests_total', utils.joinLabels([thanos.dashboard.overview.selector, 'handler="query_range"']), thanos.dashboard.overview.dimensions) + g.addDashboardLink(thanos.query.title) ) diff --git a/pkg/receive/handler.go b/pkg/receive/handler.go index 32468629e3..b863173e1a 100644 --- a/pkg/receive/handler.go +++ b/pkg/receive/handler.go @@ -710,7 +710,7 @@ func (a *nopSeriesLimit) isUnderLimit(_ string, _ log.Logger) (bool, error) { // forward accepts a write request, batches its time series by // corresponding endpoint, and forwards them in parallel to the // correct endpoint. Requests destined for the local node are written -// the the local receiver. For a given write request, at most one outgoing +// the local receiver. For a given write request, at most one outgoing // write request will be made to every other node in the hashring, // unless the request needs to be replicated. // The function only returns when all requests have finished diff --git a/pkg/server/http/option.go b/pkg/server/http/option.go index 350caf1635..d08699f9df 100644 --- a/pkg/server/http/option.go +++ b/pkg/server/http/option.go @@ -55,7 +55,7 @@ func WithEnableH2C(enableH2C bool) Option { }) } -// WithMux overrides the the server's default mux. +// WithMux overrides the server's default mux. func WithMux(mux *http.ServeMux) Option { return optionFunc(func(o *options) { o.mux = mux