Thanks for the references! I already read them, but I couldn’t figure out what could be the exact issue.
I assume it’s maybe the following scenario:
- One user view the article and transaction starts for that user.
- Second user view the article after a few milliseconds (almost the same time) after the first user.
- Since transaction of the first user didn’t finish, the transaction for the second user aborts.
I assume this based on the following paragraph from the docs:
If a multi-document transaction is in progress, new DDL operations that affect the same database(s) or collection(s) wait behind the transaction. While these pending DDL operations exist, new transactions that access the same database(s) or collection(s) as the pending DDL operations cannot obtain the required locks and and will abort after waiting
maxTransactionLockRequestTimeoutMillis(which defaults to 5ms).
I think it can probably be solved by increasing the maxTransactionLockRequestTimeoutMillis, but I wanted to check with the community too.