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

mariabackup --ftwrl-wait-timeout never times out on explicit lock

Details

    Description

      Mariabackup --ftwrl-wait-timeout only times out if FLUSH is blocked by an actual running query in another session; same for BACKUP LOGS in 10.4.

      If FLUSH is blocked by an explicit LOCK TABLES ... WRITE being active in another session though, which is otherwise idle, mariabackup will just continue waiting forever, instead of giving up after having reached the timeout ...

      Attachments

        Issue Links

          Activity

            hholzgra The behaviour of "--ftwrl-wait-timeout" is exactly the same as described in documentation(https://mariadb.com/kb/en/mariabackup-options/#-ftwrl-wait-timeout): "If it encounters statements still in the process of executing, it waits until they complete before setting the lock."

            It does not finish mariabackup execution when acquired backup lock can't be grabbed for the certain amount of time, it just waits for a long queries finishing before acquiring the lock, to avoid unnecessary locking.

            So if "LOCK TABLES ... WRITE" is not in the process of executing for the certain amount of time before getting backup lock, then mariabackup does not finish it's execution.

            I agree that the option name is confusing. But it has historically happened.

            I suppose you want implementation of something like lock_wait_timeout, i.e. you want some option which would allow to finish mariabackup execution when backup lock acquiring takes longer then the certain time. Is it true?

            If so, we could implement some new option, for example, --backup-lock-wait-timeout. If you want to propose some other name, you are welcome. Or, we could extend the functionality of --ftwrl-wait-timeout. But in this case we should also change our documentation and be ready to serve clients who expect the current, but not new behaviour of this option.

            vlad.lesin Vladislav Lesin added a comment - hholzgra The behaviour of "--ftwrl-wait-timeout" is exactly the same as described in documentation( https://mariadb.com/kb/en/mariabackup-options/#-ftwrl-wait-timeout): "If it encounters statements still in the process of executing, it waits until they complete before setting the lock." It does not finish mariabackup execution when acquired backup lock can't be grabbed for the certain amount of time, it just waits for a long queries finishing before acquiring the lock, to avoid unnecessary locking. So if "LOCK TABLES ... WRITE" is not in the process of executing for the certain amount of time before getting backup lock, then mariabackup does not finish it's execution. I agree that the option name is confusing. But it has historically happened. I suppose you want implementation of something like lock_wait_timeout, i.e. you want some option which would allow to finish mariabackup execution when backup lock acquiring takes longer then the certain time. Is it true? If so, we could implement some new option, for example, --backup-lock-wait-timeout. If you want to propose some other name, you are welcome. Or, we could extend the functionality of --ftwrl-wait-timeout. But in this case we should also change our documentation and be ready to serve clients who expect the current, but not new behaviour of this option.

            We have discussed this issue with ralf.gebhardt@mariadb.com, and came to decision to extend --ftwrl-wait-timeout functionality instead of creating new option. We also need to reflect it in documentation.

            vlad.lesin Vladislav Lesin added a comment - We have discussed this issue with ralf.gebhardt@mariadb.com , and came to decision to extend --ftwrl-wait-timeout functionality instead of creating new option. We also need to reflect it in documentation.

            People

              vlad.lesin Vladislav Lesin
              hholzgra Hartmut Holzgraefe
              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.