Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

[dev.scraping-service-scalability] Fork the cortex ring/kv package for use with the configstore - #927

Merged
rfratto merged 2 commits into
grafana-cold-storage:dev.scraping-service-scalabilityfrom
rfratto:fork-cortex-kv
Sep 21, 2021
Merged

[dev.scraping-service-scalability] Fork the cortex ring/kv package for use with the configstore#927
rfratto merged 2 commits into
grafana-cold-storage:dev.scraping-service-scalabilityfrom
rfratto:fork-cortex-kv

Conversation

@rfratto

@rfratto rfratto commented Sep 20, 2021

Copy link
Copy Markdown
Contributor

PR Description

The cortex kv package is focused heavily on a hash ring, making it increasingly inappropriate to use as a KV store for the configstore, which has different expectations about how it will be consumed. This initial PR does a basic copy
of the cortex package (from the specific version of Cortex we're already depending on) into configstore.

Initial changes from the Cortex package:

  • Memberlist is removed
  • cortex_ metrics have been reprefixed with agent_

This is a medium-term fix. I do not anticipate that the configstore package will exist forever, but we need a way to make it performant for now until we have something long-term in place.

Which issue(s) this PR fixes

This also unveiled a bug in updating the cluster config. Oops!

Notes to the Reviewer

This PR also immediately uses the new package, which doesn't require much except to point at the new location.

PR Checklist

  • CHANGELOG updated
  • Documentation added
  • Tests updated

The cortex ring/kv package is focused heavily on a hash ring, making it
increasingly inappropriate to use as a KV store for the configstore,
which expects a ton of traffic. This initial PR does a basic copy
of the cortex package into configstore/kv.

Initial changes from the Cortex package:

- Memberlist is removed
- cortex_ metrics have been reprefixed with agent_
@rfratto
rfratto requested a review from mattdurham September 20, 2021 20:29
@56quarters

Copy link
Copy Markdown
Contributor

You probably want to fork the one in dskit which has recently had some work done to strip down its dependencies: grafana/dskit#43

@rfratto

rfratto commented Sep 20, 2021

Copy link
Copy Markdown
Contributor Author

You probably want to fork the one in dskit which has recently had some work done to strip down its dependencies: grafana/dskit#43

Thanks for the suggestion! I had considered this, but even if nothing has really changed, I want to be extra certain (for now) that we remain as close as possible to the existing code. I'll definitely want to revisit this after 0.19.0 and see if we can pull over stuff from dskit instead.

@rfratto

rfratto commented Sep 20, 2021

Copy link
Copy Markdown
Contributor Author

I'm a little surprised the macOS tests are failing since I didn't really change anything. I'll look into it more tomorrow morning, but otherwise this should be a pretty small thing to review.

@rfratto rfratto changed the title Fork the cortex ring/kv package for use with the configstore [dev.scraping-service-scalability] Fork the cortex ring/kv package for use with the configstore Sep 21, 2021

@mattdurham mattdurham left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@rfratto
rfratto merged commit d0e4332 into grafana-cold-storage:dev.scraping-service-scalability Sep 21, 2021
@rfratto
rfratto deleted the fork-cortex-kv branch September 21, 2021 13:15
@github-actions github-actions Bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Apr 9, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants