Mongo.BulkWrite.write

You're seeing just the function write, go back to Mongo.BulkWrite module for more information.
Link to this function

write(topology_pid, bulk, opts \\ [])

View Source

Specs

Executes unordered and ordered bulk writes.

Unordered bulk writes

The operation are grouped (inserts, updates, deletes). The order of execution is:

  1. inserts
  2. updates
  3. deletes

The execution order within the group is not preserved.

Ordered bulk writes

Sequences of the same operations are grouped and sent as one command. The order is preserved.

If a group (inserts, updates or deletes) exceeds the limit maxWriteBatchSize it will be split into chunks. Everything is done in memory, so this use case is limited by memory. A better approach seems to use streaming bulk writes.