Skip to content

Conversation

@joe-elliott
Copy link
Collaborator

@joe-elliott joe-elliott commented Aug 22, 2024

What this PR does:
This PR cleans up unused code that Tempo inherited that allows the configuration of the max number of queriers a tenant has access to. This code is complicating attempts to improve this element of the frontend. It is currently unused and not even usable.

Additionally, I've moved the clean up of user queues to a timer. This prevents "flapping" of user queue creation/deletion. Currently, we delete the queue if we notice it has 0 jobs. This requires us to over provision go routines to shove jobs into the queue to prevent it from being constantly recreated. This PR should allow us to reduce the number of goroutines used to put pressure on the user queues lock and achieve the same query performance.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Copy link
Contributor

@javiermolinar javiermolinar left a comment

Choose a reason for hiding this comment

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

Awesome! Love the code clean-up

@javiermolinar
Copy link
Contributor

I wonder if we should rename "users" to "tenants". It's pretty confusing already

const (
// How frequently to check for disconnected queriers that should be forgotten.
forgetCheckPeriod = 5 * time.Second
forgetCheckPeriod = 30 * time.Second // every 30 seconds b/c the the stopping code requires there to be no queues. i would like to make this 5-10 minutes but then shutdowns would be blocked
Copy link
Member

Choose a reason for hiding this comment

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

should we put this info somewhere in docs? feel like an internal detail so not sure if we should.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not sure where i would do that

Signed-off-by: Joe Elliott <[email protected]>
@joe-elliott
Copy link
Collaborator Author

joe-elliott commented Aug 23, 2024

I wonder if we should rename "users" to "tenants". It's pretty confusing already

We should drift towards "tenant", but I'm not willing to take that on in this PR.

Signed-off-by: Joe Elliott <[email protected]>
@joe-elliott joe-elliott merged commit 3414179 into grafana:main Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants