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

thd_wait_end does not called in some cases in buf_page_read_low in XtraDB engine

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.28a
    • Fix Version/s: 5.5.29
    • Component/s: None
    • Labels:
      None

      Description

      in file storage/xtradb/buf/buf0rea.c, buf_read_page_low(),
      thd_wait_begin() is called when synchronous is requested, however thd_wait_end() is not called in case of fil_io() returns error DB_TABLESPACE_DELETED.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            serg Sergei Golubchik added a comment -

            Fixed. Thanks for looking into this!

            By the way, the bug was introduced in the changeset with the comment "Only synchronous disk reads should use thd_wait_begin with THD_WAIT_DISKIO". You might want to consider doing something similar. Just a thought.

            Show
            serg Sergei Golubchik added a comment - Fixed. Thanks for looking into this! By the way, the bug was introduced in the changeset with the comment "Only synchronous disk reads should use thd_wait_begin with THD_WAIT_DISKIO". You might want to consider doing something similar. Just a thought.
            Hide
            laurynas Laurynas Biveinis added a comment -

            Hi Sergei and Sergei -

            > By the way, the bug was introduced in the changeset with the comment "Only synchronous disk reads should use thd_wait_begin with THD_WAIT_DISKIO". You might
            > want to consider doing something similar. Just a thought.

            Indeed, thanks. Sergei (Glushchenko), is this included in our TP port?

            Show
            laurynas Laurynas Biveinis added a comment - Hi Sergei and Sergei - > By the way, the bug was introduced in the changeset with the comment "Only synchronous disk reads should use thd_wait_begin with THD_WAIT_DISKIO". You might > want to consider doing something similar. Just a thought. Indeed, thanks. Sergei (Glushchenko), is this included in our TP port?
            Hide
            sergei Sergei Glushchenko added a comment -

            Thank you guys! Sergei, Laurynas, we have it in threadpool port. Sergei, why that revision ("Only synchronous disk reads should use thd_wait_begin with THD_WAIT_DISKIO") fixes only XtraDB engine and keeps untouched InnoDB?

            Show
            sergei Sergei Glushchenko added a comment - Thank you guys! Sergei, Laurynas, we have it in threadpool port. Sergei, why that revision ("Only synchronous disk reads should use thd_wait_begin with THD_WAIT_DISKIO") fixes only XtraDB engine and keeps untouched InnoDB?
            Hide
            wlad Vladislav Vaintroub added a comment -

            There is no technical reason not to change Innodb the same way. Generally, we did not change original Innodb much, for the sake of easy merges, and because running with non-builtin Xtradb but "vanilla" plugin Innodb instead in 5.5 is uncommon scenario. Most of our improvements were done with XtraDB in mind.

            Show
            wlad Vladislav Vaintroub added a comment - There is no technical reason not to change Innodb the same way. Generally, we did not change original Innodb much, for the sake of easy merges, and because running with non-builtin Xtradb but "vanilla" plugin Innodb instead in 5.5 is uncommon scenario. Most of our improvements were done with XtraDB in mind.
            Hide
            sergei Sergei Glushchenko added a comment -

            I see. Thank you four your reply, Vladislav.

            Show
            sergei Sergei Glushchenko added a comment - I see. Thank you four your reply, Vladislav.
            Hide
            laurynas Laurynas Biveinis added a comment -

            Re. InnoDB, is there an Oracle bug report that thd_wait_begin/end should called only for sync reads? I searched around, but didn't find anything.

            Show
            laurynas Laurynas Biveinis added a comment - Re. InnoDB, is there an Oracle bug report that thd_wait_begin/end should called only for sync reads? I searched around, but didn't find anything.
            Hide
            serg Sergei Golubchik added a comment -

            not that I know of. Most of the bug reports are now in the private Oracle bug database anyway.

            Show
            serg Sergei Golubchik added a comment - not that I know of. Most of the bug reports are now in the private Oracle bug database anyway.
            Hide
            wlad Vladislav Vaintroub added a comment -

            I did not report it, if the question is about it - I would not be able to prove the bug without commercial version of MySQL anyway.

            Show
            wlad Vladislav Vaintroub added a comment - I did not report it, if the question is about it - I would not be able to prove the bug without commercial version of MySQL anyway.
            Hide
            laurynas Laurynas Biveinis added a comment -

            Let's troll them and see what happens: http://bugs.mysql.com/bug.php?id=68197. In the best case it will reduce the XtraDB delta for us. Sergei Glushchenko, can you duplicate that bug for PS and link it to the threadpool MP?

            Show
            laurynas Laurynas Biveinis added a comment - Let's troll them and see what happens: http://bugs.mysql.com/bug.php?id=68197 . In the best case it will reduce the XtraDB delta for us. Sergei Glushchenko, can you duplicate that bug for PS and link it to the threadpool MP?

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                sergei Sergei Glushchenko
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m