diff --git a/cmd/thanos/store.go b/cmd/thanos/store.go index 496b0ff65cb..70b213937ee 100644 --- a/cmd/thanos/store.go +++ b/cmd/thanos/store.go @@ -192,12 +192,12 @@ func runStore( // bucketStoreReady signals when bucket store is ready. bucketStoreReady := make(chan struct{}) { - begin := time.Now() ctx, cancel := context.WithCancel(context.Background()) g.Add(func() error { defer runutil.CloseWithLogOnErr(logger, bkt, "bucket client") level.Info(logger).Log("msg", "initializing bucket store") + begin := time.Now() if err := bs.InitialSync(ctx); err != nil { close(bucketStoreReady) return errors.Wrap(err, "bucket store initial sync") diff --git a/docs/components/store.md b/docs/components/store.md index a3d5614da51..9e5b7fe9433 100644 --- a/docs/components/store.md +++ b/docs/components/store.md @@ -143,5 +143,7 @@ Filtering is done on a Chunk level, so Thanos Store might still return Samples w ## Probes - Thanos Store exposes two endpoints for probing. - * `/-/healthy` starts as soon as initial setup completed. - * `/-/ready` starts after all the bootstrapping completed (e.g initial index building) and ready to serve traffic. + - `/-/healthy` starts as soon as initial setup completed. + - `/-/ready` starts after all the bootstrapping completed (e.g initial index building) and ready to serve traffic. + +> NOTE: Metric endpoint starts immediately so, make sure you set up readiness probe on designated HTTP `/-/ready` path.