Skip to content

Commit c5074d3

Browse files
author
Christian Hergert
committed
write-commands: track total number of expected documents.
1 parent 6b37e71 commit c5074d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mongoc/mongoc-write-command.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ _mongoc_write_command_insert_append (mongoc_write_command_t *command,
9797
}
9898
}
9999

100+
command->u.insert.n_documents += n_documents;
101+
100102
EXIT;
101103
}
102104

@@ -116,7 +118,7 @@ _mongoc_write_command_init_insert
116118

117119
command->type = MONGOC_WRITE_COMMAND_INSERT;
118120
command->u.insert.documents = bson_new ();
119-
command->u.insert.n_documents = n_documents;
121+
command->u.insert.n_documents = 0;
120122
command->u.insert.ordered = ordered;
121123
command->u.insert.allow_bulk_op_insert = allow_bulk_op_insert;
122124

0 commit comments

Comments
 (0)