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

locking occurring when upgrading to 10.5 from 10.1

    XMLWordPrintable

Details

    Description

      hello, we have recently upgraded from mariadb 10.1 to mariadb 10.5 and have been seeing some unexplained locking occuring which we have not been able to identify.

      environment

      MariaDB [dev]> \s
      --------------
      mysql  Ver 15.1 Distrib 10.5.16-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
       
      Connection id:		997
      Current database:	dev
      Current user:		root@localhost
      SSL:			Cipher in use is TLS_AES_256_GCM_SHA384
      Current pager:		stdout
      Using outfile:		''
      Using delimiter:	;
      Server:			MariaDB
      Server version:		10.5.16-MariaDB-1:10.5.16+maria~bionic-log mariadb.org binary distribution
      Protocol version:	10
      Connection:		Localhost via UNIX socket
      Server characterset:	latin1
      Db     characterset:	latin1
      Client characterset:	utf8
      Conn.  characterset:	utf8
      UNIX socket:		/var/run/mysqld/mysqld.sock
      Uptime:			41 days 22 hours 34 min 44 sec
       
      Threads: 4  Questions: 9486  Slow queries: 0  Opens: 256  Open tables: 250  Queries per second avg: 0.002
      

      output of* show engine innodb status*

      Spin rounds per wait: 28.59 RW-shared, 45.00 RW-excl, 0.00 RW-sx
      2------------
      3TRANSACTIONS
      4------------
      5Trx id counter 104227
      6Purge done for trx's n:o < 104066 undo n:o < 0 state: running
      7History list length 96
      8LIST OF TRANSACTIONS FOR EACH SESSION:
      9---TRANSACTION 422141812912496, not started
      100 lock struct(s), heap size 1128, 0 row lock(s)
      11---TRANSACTION 422141812950800, ACTIVE 17091 sec starting index read
      12mysql tables in use 2, locked 0
      130 lock struct(s), heap size 1128, 0 row lock(s)
      14MySQL thread id 16485, OS thread handle 140659917436672, query id 74379 localhost dev Sending data
      15SELECT `account`.`id`, `account`.`status`, `account`.`status_message`, `something_summary`.`id_something`, SUM(owed_sum) AS `owed_sum`, SUM(paid_sum) AS `paid_sum`, SUM(pending_sum) AS `pending_sum` FROM `account`
      16 INNER JOIN `something_summary` ON something_summary.id_account = account.id
      17 INNER JOIN `partner` ON partner.id = something_summary.id_partner WHERE (`account`.created_on >= '2021-12-01 00:00:00') AND (`account`.created_on < '2021-12-31 23:59:59') AND (account.status_message != "Submitted in error by partner") AND (partner.id = '1212') GROUP BY `account`.`id`
      18Trx read view will not see trx with id >= 104227, sees < 104208
      19---TRANSACTION 422141812946544, ACTIVE 18258 sec starting index read
      20mysql tables in use 2, locked 0
      210 lock struct(s), heap size 1128, 0 row lock(s)
      22MySQL thread id 16409, OS thread handle 140666827491072, query id 73613 localhost dev Sending data
      23SELECT `account`.`id`, `account`.`status`, `account`.`status_message`, `something_summary`.`id_something`, SUM(owed_sum) AS `owed_sum`, SUM(paid_sum) AS `paid_sum`, SUM(pending_sum) AS `pending_sum` FROM `account`
      24 INNER JOIN `something_summary` ON something_summary.id_account = account.id
      25 INNER JOIN `partner` ON partner.id = something_summary.id_partner WHERE (`account`.created_on >= '2021-12-01 00:00:00') AND (`account`.created_on < '2021-12-31 23:59:59') AND (account.status_message != "Submitted in error by partner") AND (partner.id = '1212') GROUP BY `account`.`id`
      26Trx read view will not see trx with id >= 104227, sees < 104208
      27---TRANSACTION 422141812942288, ACTIVE 18285 sec starting index read
      28mysql tables in use 2, locked 0
      290 lock struct(s), heap size 1128, 0 row lock(s)
      30MySQL thread id 16403, OS thread handle 140659916515072, query id 73587 localhost dev Sending data
      31SELECT `account`.`id`, `account`.`status`, `account`.`status_message`, `something_summary`.`id_something`, SUM(owed_sum) AS `owed_sum`, SUM(paid_sum) AS `paid_sum`, SUM(pending_sum) AS `pending_sum` FROM `account`
      32 INNER JOIN `something_summary` ON something_summary.id_account = account.id
      33 INNER JOIN `partner` ON partner.id = something_summary.id_partner WHERE (`account`.created_on >= '2021-12-01 00:00:00') AND (`account`.created_on < '2021-12-31 23:59:59') AND (account.status_message != "Submitted in error by partner") AND (partner.id = '1212') GROUP BY `account`.`id`
      34Trx read view will not see trx with id >= 104227, sees < 104208
      35---TRANSACTION 104220, ACTIVE 18446744073708026459 sec inserting
      36mysql tables in use 1, locked 1
      371 lock struct(s), heap size 1128, 0 row lock(s), undo log entries 1
      38MySQL thread id 16061, OS thread handle 140666826262272, query id 71685 localhost dev Update
      39INSERT INTO `something_pending` (`id_account`, `id_something`, `id_partner`, `date`, `amount`, `last_updated`, `created_on`, `owner`) VALUES ('7641771', '53730175', '206917', '2022-10-06', '100', NOW(), NOW(), 'someuser')
      40---TRANSACTION 104208, ACTIVE 18446744073708248571 sec updating or deleting
      41mysql tables in use 1, locked 1
      422 lock struct(s), heap size 1128, 1 row lock(s), undo log entries 1
      43MySQL thread id 6241, OS thread handle 140659918972672, query id 39141 localhost dev Updating
      44UPDATE `account_transaction` SET `owner` = 'someuser', `processor` = 'someprocessor', `status` = 'success', `string_account_number` = '42712291121901', `id_lender` = '1303', `paid_on` = CURDATE(), `lender` = SOME BANK SERVICES', `reason` = '', `last_updated` = '2022-07-26 00:00:00', `check_number` = '44556677' WHERE (id = '67764108')
      45---TRANSACTION 422141812908240, not started
      460 lock struct(s), heap size 1128, 0 row lock(s)
      

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              stackoverdrive StackOverdrive
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.