Bug #113277 | Blocking prevents a transaction from acquiring a lock properly | ||
---|---|---|---|
Submitted: | 29 Nov 2023 6:09 | Modified: | 5 Dec 2023 13:37 |
Reporter: | Cundi Fang | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S3 (Non-critical) |
Version: | 8.0.35-cluster MySQL Cluster Community S | OS: | Ubuntu (20.04) |
Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
Tags: | lock, Stuck, timeout |
[29 Nov 2023 6:09]
Cundi Fang
[30 Nov 2023 13:44]
MySQL Verification Team
Hi, Thank you for using NDB CLUSTER and for reporting this behavior but this is not a bug. The "first-come-first-served" makes no sense as you cannot know what came first, the point that you "entered the query" before other query does not mean it came first. There is nothing that will guarantee order of operations in this case, and, especially in this case, order of operations is irrelevant as it ends up with the same result whatever the order is.
[5 Dec 2023 13:37]
Cundi Fang
Thank you for your reply! However, there might have been some misunderstanding due to the way I described the issue. What I want to emphasize is not that the transaction handling of MySQL Cluster violates the 'first-come, first-served' principle. Rather, I want to highlight that the competition between two different levels of locks (row-level locks and table-level locks) leads to 'deadlocks', or at least 'long waits', which is something I do not wish to see. I have also been trying to reproduce this error in the past few days, and I found that the error is more likely to be triggered when there is a larger amount of data.
[5 Dec 2023 16:03]
MySQL Verification Team
> competition between two different levels of locks (row-level locks and table-level locks) leads to 'deadlocks', or at least 'long waits', which is something I do not wish to see. That is not really a bug, and there's not really much we can do about it. I could say that "drop table" in a busy application is not considered a good practice but there are always ways to trigger a deadlock, that is why detection exist and it is never ideal.