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

row_sel_try_search_shortcut_for_mysql() does not latch a page, violating read view isolation

Details

    Description

      We have been testing Galera-MariaDB on data consistency models. We (together with the Galera contributor) found REPEATABLE READ anomalies with Galera disabled. Hence, there might be something wrong with MariaDB. We used the default REPEATABLE READ isolation in our testing.

      The collected data (or histories of transaction executions):
      https://gist.github.com/sciascid/aae12c130bdcfe1930601f19ce0f29d5/archive/6b214d707fdf0fb72b2505955c0e23d38717db6d.zip

      The specific anomaly was shown at https://github.com/codership/galera/issues/609#issuecomment-1036096287 Also see the table attached.

      Notation: w/r(key, value, client_id, txn_id); operations of a txn (denoted by a column) are listed from top down.

      Anomaly: txn393 read value 3328 on key 0 (red cell, column 1) in between the reads of value 33324 on key 0 (yellow cells).

      Setup: 3 server nodes and 3 client nodes. Galera Version: 26.4.9. MariaDB Version: 10.4.22.

      Attachments

        Issue Links

          Activity

            nobiplusplus Si Liu created issue -
            nobiplusplus Si Liu made changes -
            Field Original Value New Value
            Description We have been testing Galera-MariaDB on data consistency models. We (together with the Galera contributor) found REPEATABLE READ anomalies with Galera disabled. Hence, there might be something wrong with MariaDB. We used the default REPEATABLE READ isolation in our testing.

            The collected data (or histories of transaction executions):
            https://gist.github.com/sciascid/aae12c130bdcfe1930601f19ce0f29d5/archive/6b214d707fdf0fb72b2505955c0e23d38717db6d.zip

            The specific anomaly was reported at https://github.com/codership/galera/issues/609#issuecomment-1036096287 See the table.

            *Notation*: w/r(key, value, client_id, txn_id); operations of a txn (denoted by a column) are listed from top down.

            *Anomaly*: txn393 read value 3328 on key 0 (red cell, column 1) in between the reads of value 33324 on key 0 (yellow cells).

            *Setup*: 3 server nodes and 3 client nodes. Galera Version: 26.4.9. MariaDB Version: 10.4.22.
            We have been testing Galera-MariaDB on data consistency models. We (together with the Galera contributor) found REPEATABLE READ anomalies with Galera disabled. Hence, there might be something wrong with MariaDB. We used the default REPEATABLE READ isolation in our testing.

            The collected data (or histories of transaction executions):
            https://gist.github.com/sciascid/aae12c130bdcfe1930601f19ce0f29d5/archive/6b214d707fdf0fb72b2505955c0e23d38717db6d.zip

            The specific anomaly was shown at https://github.com/codership/galera/issues/609#issuecomment-1036096287 See the table.

            *Notation*: w/r(key, value, client_id, txn_id); operations of a txn (denoted by a column) are listed from top down.

            *Anomaly*: txn393 read value 3328 on key 0 (red cell, column 1) in between the reads of value 33324 on key 0 (yellow cells).

            *Setup*: 3 server nodes and 3 client nodes. Galera Version: 26.4.9. MariaDB Version: 10.4.22.
            nobiplusplus Si Liu made changes -
            nobiplusplus Si Liu made changes -
            Description We have been testing Galera-MariaDB on data consistency models. We (together with the Galera contributor) found REPEATABLE READ anomalies with Galera disabled. Hence, there might be something wrong with MariaDB. We used the default REPEATABLE READ isolation in our testing.

            The collected data (or histories of transaction executions):
            https://gist.github.com/sciascid/aae12c130bdcfe1930601f19ce0f29d5/archive/6b214d707fdf0fb72b2505955c0e23d38717db6d.zip

            The specific anomaly was shown at https://github.com/codership/galera/issues/609#issuecomment-1036096287 See the table.

            *Notation*: w/r(key, value, client_id, txn_id); operations of a txn (denoted by a column) are listed from top down.

            *Anomaly*: txn393 read value 3328 on key 0 (red cell, column 1) in between the reads of value 33324 on key 0 (yellow cells).

            *Setup*: 3 server nodes and 3 client nodes. Galera Version: 26.4.9. MariaDB Version: 10.4.22.
            We have been testing Galera-MariaDB on data consistency models. We (together with the Galera contributor) found REPEATABLE READ anomalies with Galera disabled. Hence, there might be something wrong with MariaDB. We used the default REPEATABLE READ isolation in our testing.

            The collected data (or histories of transaction executions):
            https://gist.github.com/sciascid/aae12c130bdcfe1930601f19ce0f29d5/archive/6b214d707fdf0fb72b2505955c0e23d38717db6d.zip

            The specific anomaly was shown at https://github.com/codership/galera/issues/609#issuecomment-1036096287 Also see the table attached.

            *Notation*: w/r(key, value, client_id, txn_id); operations of a txn (denoted by a column) are listed from top down.

            *Anomaly*: txn393 read value 3328 on key 0 (red cell, column 1) in between the reads of value 33324 on key 0 (yellow cells).

            *Setup*: 3 server nodes and 3 client nodes. Galera Version: 26.4.9. MariaDB Version: 10.4.22.
            nobiplusplus Si Liu made changes -
            Labels galera isolation repeatable_read tests galera innodb isolation repeatable_read
            greenman Ian Gilfillan made changes -
            Key MDBI-109 MDEV-27927
            Project MariaDB Foundation Internal [ 12001 ] MariaDB Server [ 10000 ]
            elenst Elena Stepanova made changes -
            Assignee Marko Mäkelä [ marko ]
            elenst Elena Stepanova made changes -
            Fix Version/s 10.4 [ 22408 ]
            Affects Version/s 10.4 [ 22408 ]
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] Needs Feedback [ 10501 ]
            zoooesong Zoe Song made changes -
            Comment [ First of all, the Repeatable Read we mentioned here is actually Cut Isolation (lower level of Repeatable Read), i.e., given a key and a transaction, if this transaction read the key multiple times and there is no write on the key between these read operations, then the results of read should be consistent.

            For the executable testing scripts, in the beginning, we were testing Causal Consistency of Galera Cluster. During the investigation, we found this repeatable read problem. To be noticed, the data reported here were generated by the Galera engineer, who managed to get the data from a single MariaDB node, with Galera replication disabled. Our original testing scripts cannot detect this Repeatable Read issue, so we created a new testing script for it. I attached our testing scripts here: https://github.com/20211202na/galera_data_generation

            Our testing scripts are following Jepsen’s testing methodology. Since it is black-box testing, we cannot produce the exact same results. If you want to reproduce this violation, it’s better to rerun the testing scripts with larger parameters. For example, 20 keys, 10 clients, 100 transactions per client, and 25 operations per transaction.
            ]
            elenst Elena Stepanova made changes -
            Status Needs Feedback [ 10501 ] Open [ 1 ]
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] Needs Feedback [ 10501 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Vladislav Lesin [ vlad.lesin ]
            Status Needs Feedback [ 10501 ] Open [ 1 ]
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            vlad.lesin Vladislav Lesin made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            vlad.lesin Vladislav Lesin made changes -
            Attachment MDEV-27927-test.diff [ 65240 ]
            vlad.lesin Vladislav Lesin made changes -
            Summary REPEATABLE READ anomaly found row_sel_try_search_shortcut_for_mysql() does not latch a page, what causes RR and RC isolation violaion
            vlad.lesin Vladislav Lesin made changes -
            Summary row_sel_try_search_shortcut_for_mysql() does not latch a page, what causes RR and RC isolation violaion row_sel_try_search_shortcut_for_mysql() does not latch a page, violating read view isolation
            vlad.lesin Vladislav Lesin made changes -
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.8 [ 26121 ]
            Fix Version/s 10.9 [ 26905 ]
            Fix Version/s 10.10 [ 27530 ]
            Affects Version/s 10.3 [ 22126 ]
            Affects Version/s 10.5 [ 23123 ]
            Affects Version/s 10.6 [ 24028 ]
            Affects Version/s 10.7 [ 24805 ]
            Affects Version/s 10.8 [ 26121 ]
            Affects Version/s 10.9 [ 26905 ]
            Affects Version/s 10.10 [ 27530 ]
            Affects Version/s 10.11 [ 27614 ]
            vlad.lesin Vladislav Lesin made changes -
            Fix Version/s 10.11 [ 27614 ]
            axel Axel Schwenke made changes -
            Attachment MDEV-27927.pdf [ 65416 ]
            vlad.lesin Vladislav Lesin made changes -
            Component/s Storage Engine - InnoDB [ 10129 ]
            Fix Version/s 10.3.37 [ 28404 ]
            Fix Version/s 10.4.27 [ 28405 ]
            Fix Version/s 10.5.18 [ 28421 ]
            Fix Version/s 10.6.11 [ 28441 ]
            Fix Version/s 10.7.7 [ 28442 ]
            Fix Version/s 10.8.6 [ 28443 ]
            Fix Version/s 10.9.4 [ 28444 ]
            Fix Version/s 10.10.2 [ 28410 ]
            Fix Version/s 10.11.1 [ 28454 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.8 [ 26121 ]
            Fix Version/s 10.9 [ 26905 ]
            Fix Version/s 10.10 [ 27530 ]
            Fix Version/s 10.11 [ 27614 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            rob.schwyzer@mariadb.com Rob Schwyzer (Inactive) made changes -
            rob.schwyzer@mariadb.com Rob Schwyzer (Inactive) made changes -
            rob.schwyzer@mariadb.com Rob Schwyzer (Inactive) made changes -
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202352 201658
            Zendesk active tickets 201658

            People

              vlad.lesin Vladislav Lesin
              nobiplusplus Si Liu
              Votes:
              0 Vote for this issue
              Watchers:
              9 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.