I am using mongodb transaction. Sometimes it may happen that for concurrent transaction in same document data update the second transaction will create transient transaction error which will abort the second concurrent update.
In this case retry helps. My question is there better design for retry of the second transaction instead of recursive method call on error? Or retry is possible in mongodb query level ?
Note: I am using it in scala playframework with reactivemongo.