[MDEV-22052] Server with wsrep enabled doesn't respect lock wait timeouts under FLUSH TABLE WITH READ LOCK Created: 2020-03-26 Updated: 2023-04-11 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Locking, wsrep |
| Affects Version/s: | 10.1, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Jan Lindström |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Note: might be related to
The expected result is that after 1 second the CREATE attempt fails with a timeout which is set for the session.. Instead, the statement hangs seemingly forever. Reproducible on 10.1-10.5, debug and non-debug alike. |
| Comments |
| Comment by Jan Lindström (Inactive) [ 2020-04-09 ] | ||||||||||
|
Fixed on edc3899d9781e98b4328931884527913ebffb11f | ||||||||||
| Comment by Elena Stepanova [ 2020-04-12 ] | ||||||||||
|
It still doesn't respect lock wait timeouts. Only now, if it's started with configuration like galera test suite provides (whatever it is), the DDL fails with ER_UNKNOWN_COM_ERROR ("Aborting TOI: Global Read-Lock (FTWRL) in place") right away, regardless the configured lock_wait_timeout; and if the server is stared as a single node with WSREP enabled, e.g. with
startup options, then it hangs seemingly forever as it did before, also regardless the lock_wait_timeout. Also, here is another test case which still hangs even with the patch above, also with the standard MTR configuration under suite/galera:
| ||||||||||
| Comment by Jan Lindström (Inactive) [ 2020-05-18 ] | ||||||||||
|
elenst Does it really need to wait up to that lock_wait_timeout seconds in my opinion if we find out problematic usage it is correct to return right away, this is only way at least on brute force transactions as they can't wait. | ||||||||||
| Comment by Elena Stepanova [ 2020-05-18 ] | ||||||||||
|
No, it doesn't have to wait if a problem is revealed right away in a consistent manner (and if it really is kind of a problem which should make Galera fail, I'll leave it to Galera experts to decide on that). lock_wait_timeout has a wide-spread effect on server operation, if it isn't respected, there are probably numerous other cases where it would be visible, a specific hack around FTWRL won't fix the whole issue. |