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

[dev.scraping-service-scalability] Move #802 fix to kv fork - #933

Merged
rfratto merged 5 commits into
grafana-cold-storage:dev.scraping-service-scalabilityfrom
rfratto:merge-0.18.1-patch-to-kv-fork
Sep 22, 2021
Merged

[dev.scraping-service-scalability] Move #802 fix to kv fork#933
rfratto merged 5 commits into
grafana-cold-storage:dev.scraping-service-scalabilityfrom
rfratto:merge-0.18.1-patch-to-kv-fork

Conversation

@rfratto

@rfratto rfratto commented Sep 21, 2021

Copy link
Copy Markdown
Contributor

PR Description

#802 introduced a short-term fix for #789. Now that we're making a growing amount of changes to how we interact with the KV store, it's a good opportunity to move those changes to the fork of the KV package introduced in #927.

This PR should be equivalent in performance to the Consul change, but now works for ETCD as well.

Which issue(s) this PR fixes

Notes to the Reviewer

This is the first change to the kv interface to make List always return key value pairs instead of just keys.

PR Checklist

Need to update the CHANGELOG to reference that the metrics changed names again.

  • CHANGELOG updated
  • Documentation added
  • Tests updated

@rfratto
rfratto requested a review from mattdurham September 22, 2021 15:45
Comment on lines -427 to -428
for _, key := range keys {
go func(key string) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@mattdurham I decided that your approach of iterating over all the keys in a single goroutine and then flushing to a channel will likely be more performant, especially if there's thousands of keys.

@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 aside from that odd test error

@rfratto
rfratto merged commit 478b33f into grafana-cold-storage:dev.scraping-service-scalability Sep 22, 2021
@rfratto
rfratto deleted the merge-0.18.1-patch-to-kv-fork branch September 22, 2021 16:37
@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.

2 participants