Skip to content

TOOLS-4148 Replace waitgroup + tomb with an errgroup in ingestDocuments#985

Draft
autarch wants to merge 1 commit into04-03-tools-4148_replace_a_waitgroup_tomb_with_an_errgroup_in_streamdocuments_from
04-03-tools-4148_replace_waitgroup_tomb_with_an_errgroup_in_ingestdocuments_
Draft

TOOLS-4148 Replace waitgroup + tomb with an errgroup in ingestDocuments#985
autarch wants to merge 1 commit into04-03-tools-4148_replace_a_waitgroup_tomb_with_an_errgroup_in_streamdocuments_from
04-03-tools-4148_replace_waitgroup_tomb_with_an_errgroup_in_ingestdocuments_

Conversation

@autarch
Copy link
Copy Markdown
Collaborator

@autarch autarch commented Apr 3, 2026

The embedded tomb.Tomb in MongoImport was replicating an errgroup. This removes it in favor passing a context into ingestDocuments and runInsertionWorker. We now check for ctx.Done() inside the loop where we read docs to be inserted.

Copy link
Copy Markdown
Collaborator Author

autarch commented Apr 3, 2026

@autarch autarch force-pushed the 04-03-tools-4148_replace_waitgroup_tomb_with_an_errgroup_in_ingestdocuments_ branch from 4b83a4c to 4ba2210 Compare April 3, 2026 21:27
@autarch autarch force-pushed the 04-03-tools-4148_replace_a_waitgroup_tomb_with_an_errgroup_in_streamdocuments_ branch from 68f8a39 to b121ef3 Compare April 7, 2026 16:50
@autarch autarch force-pushed the 04-03-tools-4148_replace_waitgroup_tomb_with_an_errgroup_in_ingestdocuments_ branch 2 times, most recently from 231ee85 to d8b63da Compare April 7, 2026 16:55
@autarch autarch force-pushed the 04-03-tools-4148_replace_a_waitgroup_tomb_with_an_errgroup_in_streamdocuments_ branch 2 times, most recently from 1305254 to e6930e3 Compare April 7, 2026 21:37
@autarch autarch force-pushed the 04-03-tools-4148_replace_waitgroup_tomb_with_an_errgroup_in_ingestdocuments_ branch from d8b63da to 20dae74 Compare April 7, 2026 21:37
…nts`

The embedded `tomb.Tomb` in MongoImport was replicating an errgroup. This removes it in favor passing a context into `ingestDocuments` and `runInsertionWorker`. We now check for `ctx.Done()` inside the loop where we read docs to be inserted.
@autarch autarch force-pushed the 04-03-tools-4148_replace_a_waitgroup_tomb_with_an_errgroup_in_streamdocuments_ branch from e6930e3 to e01af14 Compare April 7, 2026 22:08
@autarch autarch force-pushed the 04-03-tools-4148_replace_waitgroup_tomb_with_an_errgroup_in_ingestdocuments_ branch from 20dae74 to ea0773c Compare April 7, 2026 22:08
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.

1 participant