From 7f3e884a31aeacedb7076845eecc3f38d87a37bb Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 24 Nov 2020 12:41:34 +0200 Subject: [PATCH] all: spelling fix: superflouos->superfluous. This is a follow-up for 0acdab3ab9f475537d4b940d28e9a76baacd032f --- lib/mergeset/part.go | 4 ++-- lib/mergeset/table_search_test.go | 2 +- lib/protoparser/csvimport/parser.go | 2 +- lib/protoparser/csvimport/parser_test.go | 2 +- lib/storage/dedup_test.go | 4 ++-- lib/storage/metric_name.go | 2 +- lib/storage/part.go | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/mergeset/part.go b/lib/mergeset/part.go index 0ead8d97c..ed4d41c9c 100644 --- a/lib/mergeset/part.go +++ b/lib/mergeset/part.go @@ -245,7 +245,7 @@ func (idxbc *indexBlockCache) Get(k uint64) *indexBlock { func (idxbc *indexBlockCache) Put(k uint64, idxb *indexBlock) { idxbc.mu.Lock() - // Remove superflouos entries. + // Remove superfluous entries. if overflow := len(idxbc.m) - getMaxCachedIndexBlocksPerPart(); overflow > 0 { // Remove 10% of items from the cache. overflow = int(float64(len(idxbc.m)) * 0.1) @@ -393,7 +393,7 @@ func (ibc *inmemoryBlockCache) Get(k inmemoryBlockCacheKey) *inmemoryBlock { func (ibc *inmemoryBlockCache) Put(k inmemoryBlockCacheKey, ib *inmemoryBlock) { ibc.mu.Lock() - // Clean superflouos entries in cache. + // Clean superfluous entries in cache. if overflow := len(ibc.m) - getMaxCachedInmemoryBlocksPerPart(); overflow > 0 { // Remove 10% of items from the cache. overflow = int(float64(len(ibc.m)) * 0.1) diff --git a/lib/mergeset/table_search_test.go b/lib/mergeset/table_search_test.go index 56de4794e..18d769e21 100644 --- a/lib/mergeset/table_search_test.go +++ b/lib/mergeset/table_search_test.go @@ -136,7 +136,7 @@ func testTableSearchSerial(tb *Table, items []string) error { n++ } if ts.NextItem() { - return fmt.Errorf("superflouos item found at position %d when searching for %q: %q", n, key, ts.Item) + return fmt.Errorf("superfluous item found at position %d when searching for %q: %q", n, key, ts.Item) } if err := ts.Error(); err != nil { return fmt.Errorf("unexpected error when searching for %q: %w", key, err) diff --git a/lib/protoparser/csvimport/parser.go b/lib/protoparser/csvimport/parser.go index 3e5126c1e..004d581b6 100644 --- a/lib/protoparser/csvimport/parser.go +++ b/lib/protoparser/csvimport/parser.go @@ -83,7 +83,7 @@ func parseRows(sc *scanner, dst []Row, tags []Tag, metrics []metric, cds []Colum tagsLen := len(tags) for sc.NextColumn() { if col >= uint(len(cds)) { - // Skip superflouous column. + // Skip superfluous column. continue } cd := &cds[col] diff --git a/lib/protoparser/csvimport/parser_test.go b/lib/protoparser/csvimport/parser_test.go index 086588bbd..ea1fbcf2b 100644 --- a/lib/protoparser/csvimport/parser_test.go +++ b/lib/protoparser/csvimport/parser_test.go @@ -165,7 +165,7 @@ func TestRowsUnmarshalSuccess(t *testing.T) { }, }) - // Superflouos columns + // Superfluous columns f("1:metric:foo", `123,456,foo,bar`, []Row{ { Metric: "foo", diff --git a/lib/storage/dedup_test.go b/lib/storage/dedup_test.go index 9ac7ba0d5..8c7fd2348 100644 --- a/lib/storage/dedup_test.go +++ b/lib/storage/dedup_test.go @@ -44,7 +44,7 @@ func TestDeduplicateSamples(t *testing.T) { } } if j != len(timestampsCopy) { - t.Fatalf("superflouos timestamps found starting from index %d: %v", j, timestampsCopy[j:]) + t.Fatalf("superfluous timestamps found starting from index %d: %v", j, timestampsCopy[j:]) } } f(time.Millisecond, nil, []int64{}) @@ -94,7 +94,7 @@ func TestDeduplicateSamplesDuringMerge(t *testing.T) { } } if j != len(timestampsCopy) { - t.Fatalf("superflouos timestamps found starting from index %d: %v", j, timestampsCopy[j:]) + t.Fatalf("superfluous timestamps found starting from index %d: %v", j, timestampsCopy[j:]) } } f(time.Millisecond, nil, []int64{}) diff --git a/lib/storage/metric_name.go b/lib/storage/metric_name.go index ec5aa31fb..9ebf70a86 100644 --- a/lib/storage/metric_name.go +++ b/lib/storage/metric_name.go @@ -479,7 +479,7 @@ var maxLabelsPerTimeseries = 30 // SetMaxLabelsPerTimeseries sets the limit on the number of labels // per each time series. // -// Superfouos labels are dropped. +// Superfluous labels are dropped. func SetMaxLabelsPerTimeseries(maxLabels int) { if maxLabels <= 0 { logger.Panicf("BUG: maxLabels must be positive; got %d", maxLabels) diff --git a/lib/storage/part.go b/lib/storage/part.go index 1fcd969d5..653a19311 100644 --- a/lib/storage/part.go +++ b/lib/storage/part.go @@ -249,7 +249,7 @@ func (ibc *indexBlockCache) Get(k uint64) *indexBlock { func (ibc *indexBlockCache) Put(k uint64, ib *indexBlock) { ibc.mu.Lock() - // Clean superflouos cache entries. + // Clean superfluous cache entries. if overflow := len(ibc.m) - getMaxCachedIndexBlocksPerPart(); overflow > 0 { // Remove 10% of items from the cache. overflow = int(float64(len(ibc.m)) * 0.1)