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

Drop abuse of pool.RunJobs #475

Closed
joe-elliott opened this issue Jan 25, 2021 · 3 comments
Closed

Drop abuse of pool.RunJobs #475

joe-elliott opened this issue Jan 25, 2021 · 3 comments

Comments

@joe-elliott
Copy link
Member

joe-elliott commented Jan 25, 2021

Is your feature request related to a problem? Please describe.
Generally the jury is still out on the RunJobs queue, but it is abused in 2 places that needs to be corrected in the short term:

foundBytes, err := rw.pool.RunJobs(derivedCtx, copiedBlocklist, func(ctx context.Context, payload interface{}) ([]byte, error) {

// todo: continued abuse of runJobs. need a runAllJobs() method or something

These should be replaced by any of a million better patterns to limit concurrency.

EDIT:
Ignore the first link. See discussion below.

@mdisibio
Copy link
Contributor

mdisibio commented Jan 28, 2021

Thoughts on also changing blocklist polling? We have had issues then the blocklist is large (thousands).

@joe-elliott
Copy link
Member Author

Yup, that first link is wrong. It's to the only place I want to actually keep RunJobs. It should be:

https://github.com/grafana/tempo/blob/master/tempodb/tempodb.go#L326

which is blocklist polling.

@joe-elliott
Copy link
Member Author

Fixed in the linked PR.

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

No branches or pull requests

2 participants