1000 transactions per batch for Mongo Transaction Management

Hello @Laks ,

I notice you haven’t had a response to this topic yet - were you able to find a solution?
If not, could you confirm if my understanding for your use-case is correct?

I think you are referring to this post of best practices for transactions in MongoDB. This article explains the recommended best practices for transactions. However, please note that those are separate from the actual operational limitations of transactions as described in this documentation page of operational limits of Multi-document Transactions. Note that best practices may change from version to version due to improvements in MongoDB. However, keeping document modifications less than 1000 per transaction is still recommended, as far as I know. Having said that, have you tried running transactions in which more than 1000 document modifications were involved and did you see any errors/issues?

Coming back to your use case, I understand that sometimes if TaskId cannot be split into less than 1000 documents, are there any other fields that could be used in conjunction with TaskId (by acting as a secondary key)? For example: date, other ID sequences, names, etc. so that you can always split a transaction batch in a sub-TaskId level?

If you need more information, please provide an example document.

Regards,
Tarun

1 Like