Skip to content

Bulk indexer: Follow convention and increment waitgroup in loop before creating goroutines #891

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

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

HaraldNordgren
Copy link
Contributor

@HaraldNordgren HaraldNordgren commented Jul 24, 2024

The wg Delta should generally be added before relevant go-routines are launched. Reference: https://pkg.go.dev/sync#WaitGroup.Add

This also aligns the code with our other uses of waitgroups.

Closes #796.

@HaraldNordgren HaraldNordgren force-pushed the bulk_indexer_waitgroup branch from 97abc8a to b07133d Compare July 24, 2024 08:37
@HaraldNordgren
Copy link
Contributor Author

HaraldNordgren commented Jul 25, 2024

Ping @Anaethelion @Jakub-Kapusta

@HaraldNordgren HaraldNordgren changed the title Bulk indexer: Follow convention and add to waitgroup before creating goroutines Bulk indexer: Follow convention and add to waitgroup in loop before creating goroutines Aug 1, 2024
@HaraldNordgren HaraldNordgren changed the title Bulk indexer: Follow convention and add to waitgroup in loop before creating goroutines Bulk indexer: Follow convention and increment waitgroup in loop before creating goroutines Aug 1, 2024
@Anaethelion Anaethelion merged commit dd25a11 into elastic:main Aug 2, 2024
11 checks passed
@HaraldNordgren HaraldNordgren deleted the bulk_indexer_waitgroup branch August 2, 2024 17:16
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.

BulkIndexer WaitGroup delta is added after workers are launched
2 participants