[MDEV-20230] mariabackup --ftwrl-wait-timeout never times out on explicit lock Created: 2019-08-01  Updated: 2020-08-25  Resolved: 2020-04-28

Status: Closed
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.2.26, 10.1.41, 10.3.17, 10.4.7
Fix Version/s: 10.2.32, 10.3.23, 10.4.13, 10.5.3

Type: Bug Priority: Critical
Reporter: Hartmut Holzgraefe Assignee: Vladislav Lesin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-22396 change documentation for --ftwrl-wait... Closed

 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 ...



 Comments   
Comment by Vladislav Lesin [ 2020-04-27 ]

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.

Comment by Vladislav Lesin [ 2020-04-28 ]

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.

Generated at Thu Feb 08 08:57:51 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.