Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start flush queue worker after wal replay #2456

Merged
merged 2 commits into from
May 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ storage:

```
* [CHANGE] Ignore context canceled errors in the queriers [#2440](https:/grafana/tempo/pull/2440) (@joe-elliott)
* [CHANGE] Start flush queue worker after wal replay and block rediscovery [#2456](https:/grafana/tempo/pull/2456) (@ie-pham)

## v2.1.1 / 2023-04-28
* [BUGFIX] Fix issue where Tempo sometimes flips booleans from false->true at storage time. [#2400](https:/grafana/tempo/issues/2400) (@joe-elliott)
Expand Down
10 changes: 5 additions & 5 deletions modules/ingester/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ func New(cfg Config, store storage.Store, limits *overrides.Overrides, reg prome

i.local = store.WAL().LocalBackend()

i.flushQueuesDone.Add(cfg.ConcurrentFlushes)
for j := 0; j < cfg.ConcurrentFlushes; j++ {
go i.flushLoop(j)
}

lc, err := ring.NewLifecycler(cfg.LifecyclerConfig, i, "ingester", cfg.OverrideRingKey, true, log.Logger, prometheus.WrapRegistererWithPrefix("tempo_", reg))
if err != nil {
return nil, fmt.Errorf("NewLifecycler failed: %w", err)
Expand Down Expand Up @@ -114,6 +109,11 @@ func (i *Ingester) starting(ctx context.Context) error {
return fmt.Errorf("failed to rediscover local blocks: %w", err)
}

i.flushQueuesDone.Add(i.cfg.ConcurrentFlushes)
for j := 0; j < i.cfg.ConcurrentFlushes; j++ {
go i.flushLoop(j)
}

// Now that user states have been created, we can start the lifecycler.
// Important: we want to keep lifecycler running until we ask it to stop, so we need to give it independent context
if err := i.lifecycler.StartAsync(context.Background()); err != nil {
Expand Down