Skip to content

Conversation

@gouthamve
Copy link
Contributor

Fixes #2302

@bboreham Can you test if this actually fixes the issue?

@bboreham
Copy link
Contributor

It stops the crashing, but caches no longer work - just get caller=memcached.go:164 msg="Failed to get keys from memcached" err="dial tcp :0: connect: connection refused"

@gouthamve gouthamve force-pushed the fix-multi-register-again branch 3 times, most recently from 5e1645c to c7d5c70 Compare March 20, 2020 17:49
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new design is way better! LGTM, but I have a concern about the config changes in the integration tests. May you take a look?

Move all the caches up and don't create new ones for each schema.

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
@gouthamve gouthamve force-pushed the fix-multi-register-again branch from c7d5c70 to 8614b82 Compare March 20, 2020 18:03
@gouthamve gouthamve merged commit fcf6640 into cortexproject:master Mar 20, 2020
@gouthamve gouthamve deleted the fix-multi-register-again branch March 20, 2020 18:21
Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!

Comment on lines 115 to +119
// Cache is shared by multiple stores, which means they will try and Stop
// it more than once. Wrap in a StopOnce to prevent this.
tieredCache = cache.StopOnce(tieredCache)
indexReadCache = cache.StopOnce(indexReadCache)
chunksCache = cache.StopOnce(chunksCache)
writeDedupeCache = cache.StopOnce(writeDedupeCache)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a strange design... if store isn't initializing the cache, it should not stop it. Cache should only be stopped after the last store stops using it, not by first store. Something to look at in the future I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on startup with duplicate metrics collector registration

4 participants