Skip to content

Commit

Permalink
Make requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkoyun committed Oct 17, 2019
1 parent 0c784c0 commit c731615
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/thanos/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 4 additions & 2 deletions docs/components/store.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit c731615

Please sign in to comment.