Skip to content

Commit ffb00c7

Browse files
authored
fix(import): use bulkWrite correctly COMPASS-6928 (#4545)
use bulkWrite correctly
1 parent 84b81f4 commit ffb00c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/compass-import-export/src/utils/collection-stream.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ export class WritableCollectionStream extends Writable {
159159
result = await this.dataService.bulkWrite(
160160
this.ns,
161161
documents.map(
162-
(doc: any): AnyBulkWriteOperation<Document> => ({ insertOne: doc })
162+
(document: any): AnyBulkWriteOperation<Document> => ({
163+
insertOne: { document },
164+
})
163165
),
164166
{
165167
ordered: this.stopOnErrors,

0 commit comments

Comments
 (0)