[MDEV-19530] Failing DROP TABLE replicated in Galera Created: 2019-05-20 Updated: 2019-12-12 Resolved: 2019-12-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera |
| Affects Version/s: | 10.3.10 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Claudio Nanni | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Not a Bug | Votes: | 2 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
A DROP TABLE that fails on a node due to missing table is replicated to other nodes. In this example I remove the table locally on node 10310, and then again with replication on. A similar bug was fixed long ago but that was failing due to missing permissions: https://jira.mariadb.org/browse/MDEV-8598 Not sure how important is this specific bug since the case shows an inconsistent state of the nodes but on the other hand, that a failing command is replicated is weird too and it could be the tip of an iceberg.
|
| Comments |
| Comment by Claudio Nanni [ 2019-05-27 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Wanted to add, after some discussions, that Galera by definition shoots DDLs on all nodes and it has no way to control success on each node. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2019-09-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
As you did not include error logs from all nodes, it is not clear to me is that first node still part of the cluster or not. When that node rejoins the cluster, nodes should detect that database state is inconsistent and nodes detecting the inconsistency should do shutdown. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Claudio Nanni [ 2019-09-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Stepan Patryshev (Inactive) [ 2019-09-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I've managed to reproduce it, but naturally only if "set wsrep_on=on;" is run before the second run of "drop table t1;". All binaries are non-debug built from sources: See 190915_mysqld.1.err
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Stepan Patryshev (Inactive) [ 2019-09-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I've created an MTR for this defect: galera_mdev_19530.test | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2019-09-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I think here expectations do not meet the actual design. In TOI DDL-statement (here DROP TABLE) is replicated to all nodes in the cluster before it is executed on any of the nodes. If you do set wsrep_on=OFF you indicate you know what you are doing i.e. you are executing operations that effect only one node and if not careful they could cause nodes to be out of sync. If you really want to do this I suggest using RSU. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Claudio Nanni [ 2019-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
jplindst Indeed TOI DDL-statement are replicated to all nodes before execution (or disregarding execution on local node) and this is a known behaviour indeed, but this also reminds me that Galera is limitated if the cluster can't confirm successful execution on all nodes, who knows if this can be improved somehow in the future (having some basic DDL sanity checks?). NOTE: set wsrep_on=OFF was used in the example only to create the inconsistent state (missing table on only one node), but that's not needed, any DDL that fails on the node is replicated to the others no matter what. While we understand that this happens due to Galera design, any regular user is probably surprised by that. |