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

run N threads of compactor #742

Closed
wants to merge 1 commit into from
Closed

run N threads of compactor #742

wants to merge 1 commit into from

Conversation

brianolson
Copy link
Contributor

riffing on #741

go c.doWork(bgs)
c.wg.Add(c.numWorkers)
for _ = range c.numWorkers {
go c.doWork(bgs, &c.wg)
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need to pass the workgroup if its on the compactor object already

@@ -263,34 +252,37 @@ func (c *Compactor) doWork(bgs *BGS) {
}
}

func (c *Compactor) compactNext(ctx context.Context, bgs *BGS) (*CompactorState, error) {
func (c *Compactor) compactNext(ctx context.Context, bgs *BGS) (state CompactorState, err error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

if i could delete one thing from Go, it would be named returns. I really try to avoid using them ever as they always make the code harder to follow

@brianolson brianolson marked this pull request as ready for review September 5, 2024 17:47
@brianolson brianolson marked this pull request as draft September 5, 2024 17:47
@brianolson
Copy link
Contributor Author

do #744 instead

@brianolson brianolson closed this Sep 5, 2024
@brianolson brianolson deleted the bolson/multicompactor branch September 5, 2024 20:38
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.

2 participants