Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
receive: Fixed small options race; Removed unused StartTime feature. (#…
…2816) startTimeMargin and StartTime is used only by Prometheus remote read, Thanos does not use it. Fixed following race: ``` === RUN TestMultiTSDB/run_on_existing_storage ================== WARNING: DATA RACE Read at 0x00c00073ae80 by goroutine 69: github.com/prometheus/prometheus/tsdb.validateOpts() /home/bwplotka/Repos/thanosgopath/pkg/mod/github.com/prometheus/[email protected]/tsdb/db.go:510 +0x55 github.com/prometheus/prometheus/tsdb.Open() /home/bwplotka/Repos/thanosgopath/pkg/mod/github.com/prometheus/[email protected]/tsdb/db.go:502 +0x61 github.com/thanos-io/thanos/pkg/receive.(*MultiTSDB).getOrLoadTenant.func1() /home/bwplotka/Repos/thanos/pkg/receive/multitsdb.go:268 +0x56b github.com/thanos-io/thanos/pkg/receive.(*MultiTSDB).getOrLoadTenant() /home/bwplotka/Repos/thanos/pkg/receive/multitsdb.go:302 +0x4ef github.com/thanos-io/thanos/pkg/receive.(*MultiTSDB).Open.func1() /home/bwplotka/Repos/thanos/pkg/receive/multitsdb.go:142 +0x66 golang.org/x/sync/errgroup.(*Group).Go.func1() /home/bwplotka/Repos/thanosgopath/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x85 Previous write at 0x00c00073ae80 by goroutine 57: github.com/prometheus/prometheus/tsdb.validateOpts() /home/bwplotka/Repos/thanosgopath/pkg/mod/github.com/prometheus/[email protected]/tsdb/db.go:511 +0x1f2 github.com/prometheus/prometheus/tsdb.Open() /home/bwplotka/Repos/thanosgopath/pkg/mod/github.com/prometheus/[email protected]/tsdb/db.go:502 +0x61 github.com/thanos-io/thanos/pkg/receive.(*MultiTSDB).getOrLoadTenant.func1() /home/bwplotka/Repos/thanos/pkg/receive/multitsdb.go:268 +0x56b github.com/thanos-io/thanos/pkg/receive.(*MultiTSDB).getOrLoadTenant() /home/bwplotka/Repos/thanos/pkg/receive/multitsdb.go:302 +0x4ef github.com/thanos-io/thanos/pkg/receive.(*MultiTSDB).Open.func1() /home/bwplotka/Repos/thanos/pkg/receive/multitsdb.go:142 +0x66 golang.org/x/sync/errgroup.(*Group).Go.func1() /home/bwplotka/Repos/thanosgopath/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x85 Goroutine 69 (running) created at: golang.org/x/sync/errgroup.(*Group).Go() /home/bwplotka/Repos/thanosgopath/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x73 github.com/thanos-io/thanos/pkg/receive.(*MultiTSDB).Open() /home/bwplotka/Repos/thanos/pkg/receive/multitsdb.go:141 +0x2af github.com/thanos-io/thanos/pkg/receive.TestMultiTSDB.func3() /home/bwplotka/Repos/thanos/pkg/receive/multitsdb_test.go:118 +0x6d3 testing.tRunner() /home/bwplotka/.gvm/gos/go1.14.2/src/testing/testing.go:991 +0x1eb Goroutine 57 (running) created at: golang.org/x/sync/errgroup.(*Group).Go() /home/bwplotka/Repos/thanosgopath/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x73 github.com/thanos-io/thanos/pkg/receive.(*MultiTSDB).Open() /home/bwplotka/Repos/thanos/pkg/receive/multitsdb.go:141 +0x2af github.com/thanos-io/thanos/pkg/receive.TestMultiTSDB.func3() /home/bwplotka/Repos/thanos/pkg/receive/multitsdb_test.go:118 +0x6d3 testing.tRunner() /home/bwplotka/.gvm/gos/go1.14.2/src/testing/testing.go:991 +0x1eb ================== ``` Signed-off-by: Bartlomiej Plotka <[email protected]>
- Loading branch information