As noted in
MDEV-12289, the InnoDB system column DB_ROLL_PTR currently includes a 7-bit pointer to a ‘rollback segment’. The trx_rseg_t::mutex will be acquired at the start of each write transaction, to allocate an undo log header.
This should limit the number of concurrent single-statement transactions close to 128. Note: a multi-statement transaction should not be limited by this. Also, if there are secondary indexes defined on an InnoDB table, those would be modified in separate mini-transactions, without holding trx_rseg_t::mutex. This would allow the concurrent execution of a transaction that is using the same rollback segment.
We might also consider making DB_ROLL_PTR a pointer to the redo log file. That is, do not write undo log pages at all, but instead write the data to the redo log. This idea has been floated around in MDEV-14425. This could remove the concept of rollback segments altogether, and it could make rollback and MVCC much faster on PMEM, but we would have to solve a problem: How to preserve undo logs across a redo log checkpoint?