MongoDB retryable writes in unordered bulk write operation


I am building a bulk operation for my application and it only consist of single-document write operations.

However, I need each operation to have mongodb “retryable writes” enabled correctly.

So I am wondering if an unordered bulk write works just fine for it or wether it only works with an ordered bulk operation (which would be less efficient) ?

Beside, I have correctly added the retryable write option in my connection string.

Thanks in advance,

Hello @GUIGAL_Allan, it looks like there is no restriction on using “retryable writes” with ordered or unordered bulk write operations.

Some points to note:

  • Retryable writes has no effect if the write operation’s Write Concern is 0 (zero).
  • Retryable wrtres is a feature of MongoDB Clusters (replica sets and sharded) only, and cannot be used with standalone deployments.
  • Retryable writes make only one retry attempt.

For more information see Retryable Writes.


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.