Skip to content
Snippets Groups Projects
Unverified Commit 9f529f9e authored by Goutham Veeramachaneni's avatar Goutham Veeramachaneni
Browse files

Fix timeout to be in the right place.


Previously we also included encoding times and those shouldn't be
included.

Signed-off-by: default avatarGoutham Veeramachaneni <gouthamve@gmail.com>
parent fa4f936f
No related branches found
No related tags found
No related merge requests found
......@@ -169,8 +169,6 @@ func (i *Ingester) flushUserSeries(userID string, fp model.Fingerprint, immediat
}
ctx := user.InjectOrgID(context.Background(), userID)
ctx, cancel := context.WithTimeout(ctx, i.cfg.FlushOpTimeout)
defer cancel()
err := i.flushChunks(ctx, fp, labels, chunks)
if err != nil {
return err
......@@ -264,6 +262,9 @@ func (i *Ingester) flushChunks(ctx context.Context, fp model.Fingerprint, labelP
wireChunks = append(wireChunks, c)
}
ctx, cancel := context.WithTimeout(ctx, i.cfg.FlushOpTimeout)
defer cancel()
if err := i.store.Put(ctx, wireChunks); err != nil {
return err
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment