[MDEV-32451] Hang when locking both spider table and remote table in the same statement Created: 2023-10-12 Updated: 2023-11-28 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Spider |
| Affects Version/s: | 10.4, 10.5, 10.6, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3 |
| Fix Version/s: | 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Yuchen Pei | Assignee: | Yuchen Pei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | hang, locking | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
A simplified version of a test mentioned in a comment in
The metadata lock of t is acquired when opening tables. Then in lock_external() it iterates over all tables to lock. After locking t, when trying to lock t2, spider sends a query to the data node to lock t again. Somehow the MDL lock of t is not released yet, so the triggered open_table() hangs at waiting for MDL until lock_wait_timeout (default 1h) has passed. Not sure whether it counts as a spider bug or a sql layer bug. For comparison, if we simply lock tables with the same name / alias in one statement, the parser would pick out the issue and throw a 1066 ER_NONUNIQ_TABLE |
| Comments |
| Comment by Yuchen Pei [ 2023-10-12 ] | |||||||
|
One possible solution is the same as | |||||||
| Comment by Roel Van de Paar [ 2023-10-14 ] | |||||||
|
I used the original testcase routed via CLI to check for the hangs
All versions 10.4-11.3 dbg+opt hung. I confirmed the issue based on this.
Same outcome (1429) on 11.0.4 9880006b5ba28d7c7dc1596d958295c67efa5ad0 (Debug) |