diff --git a/tsdb/compact_test.go b/tsdb/compact_test.go index 4dfb06a673..1cb6b6b919 100644 --- a/tsdb/compact_test.go +++ b/tsdb/compact_test.go @@ -650,8 +650,8 @@ func TestCompaction_CompactEmptyBlocks(t *testing.T) { } bdir := filepath.Join(dir, id.String()) - require.NoError(t, os.Mkdir(bdir, 0777)) - require.NoError(t, os.Mkdir(chunkDir(bdir), 0777)) + require.NoError(t, os.Mkdir(bdir, 0o777)) + require.NoError(t, os.Mkdir(chunkDir(bdir), 0o777)) _, err := writeMetaFile(log.NewNopLogger(), bdir, m) require.NoError(t, err) diff --git a/tsdb/querier_bench_test.go b/tsdb/querier_bench_test.go index 72e4b287fb..a546986711 100644 --- a/tsdb/querier_bench_test.go +++ b/tsdb/querier_bench_test.go @@ -169,7 +169,7 @@ func BenchmarkQuerierSelect(b *testing.B) { } require.NoError(b, app.Commit()) - bench := func(b *testing.B, br BlockReader, sorted bool, sharding bool) { + bench := func(b *testing.B, br BlockReader, sorted, sharding bool) { matcher := labels.MustNewMatcher(labels.MatchEqual, "foo", "bar") for s := 1; s <= numSeries; s *= 10 { b.Run(fmt.Sprintf("%dof%d", s, numSeries), func(b *testing.B) { diff --git a/tsdb/symbols_batch.go b/tsdb/symbols_batch.go index b6f6a3a345..8ef4e9ac28 100644 --- a/tsdb/symbols_batch.go +++ b/tsdb/symbols_batch.go @@ -257,7 +257,6 @@ func openFiles(filenames []string) ([]*os.File, error) { for _, fn := range filenames { f, err := os.Open(fn) - if err != nil { // Close files opened so far. for _, sf := range result {