Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-23382

Change DB_ROLL_PTR format to allow more than 128 concurrent START TRANSACTION

    XMLWordPrintable

    Details

      Description

      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?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration