[MDEV-20225] MDL BF-BF conflict of DROP TRIGGER vs INSERT ... SELECT for the table with trigger vs DELETE from table trigger logs to Created: 2019-07-31 Updated: 2022-01-10 Resolved: 2019-10-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera |
| Affects Version/s: | 10.4.6 |
| Fix Version/s: | 10.4.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Valerii Kravchuk | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
The following conflict happens on MariaDB 10.4.6 (schema details removed/anonymized:
On node1 we see in the processlist (eventually threads were killed):
Trigger works with that audit_change table. On node2 we see:
We have:
I'd expect metadata locks to be set on applier node and prevent attempt to execute DROP TRIGGER in parallel, further fail and retries etc. IMHO it is a bug. |
| Comments |
| Comment by Jan Lindström (Inactive) [ 2019-09-09 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
I was able to repeat MDL BF-BF conflict using attached test case and with default parameters. I attached error logs from both servers. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Seppo Jaakola [ 2019-09-10 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
The mtr test reveals a problem in BF aborting a stored procedure execution, which happens in too low level inside SP execution loop. However, the actual issue reported here is about conflict between DROP TRIGGER and INSERT...SELECT executions. Both executIons are marked as high priority, and MariaDB should not allow these to be applied parallelly, in the first place. More detailed information is needed for reproducing this issue:
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Valerii Kravchuk [ 2019-09-10 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
As for the impact, all 3 nodes went non-Primary. I'll try to get the details to answer your other questions. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Seppo Jaakola [ 2019-09-10 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Another fix was pushed in our PR, with the purpose of preventing parallel applying of DROP TRIGGER and overlapping DML. However, there is no test script yet for this potential error scenario | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2019-09-30 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
seppo I tried your PR with attached test case and it still crashes. Now differently and it seems that we try to send result set after actual SP-execution has been terminated maybe because of BF kill or after a error. Here is stack trace from my laptop:
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2019-09-30 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Attached latest error log here. Second type of crash I had contains following stack:
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2019-09-30 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
I could not repeat these crashes when running standalone server with same test case (i.e. galera disabled). | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2019-10-01 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
I could not repeat the problem with 10.2 | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Julien Fritsch [ 2020-12-03 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Found in disabled.def that it was disabled, also I'm adding the missing label. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Julien Fritsch [ 2020-12-03 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Found in disabled.def for ES that it was disabled, also I'm adding the missing label. |