Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Not a Bug
-
10.2.25
-
centos 6.10 64bit,mariadb 10.2.25,2 node galera with one garb
Description
my operation is:
open the first session:
select sleep(1000),id from test;
open the second session:
alter table test add id2 int;
then i find session 1 was killed and report deadlock,and the ddl
is success.
the errlog log shows:
2019-09-17 14:47:31 139664119084800 [Note] WSREP: TO BEGIN: -1, 0 : truncate a1
2019-09-17 14:47:31 139664119084800 [Note] WSREP: TO BEGIN: 18, 2
2019-09-17 14:47:31 139664119084800 [Note] WSREP: MDL conflict
schema: test
request: (15 seqno 18 wsrep (2, 1, 0) cmd 3 8 truncate a1)
granted: (14 seqno -1 wsrep (0, 0, 0) cmd 0 7 (null))
2019-09-17 14:47:31 139664119084800 [Note] WSREP: MDL ticket: type: shared write space: TABLE db: test name: a1 (Waiting
for table metadata lock)
2019-09-17 14:47:31 139664119084800 [Note] WSREP: MDL conflict-> BF abort
schema: test
request: (15 seqno 18 wsrep (2, 1, 0) cmd 3 8 truncate a1)
granted: (14 seqno -1 wsrep (0, 0, 0) cmd 0 7 (null))
2019-09-17 14:47:31 139664119084800 [Note] WSREP: MDL ticket: type: shared write space: TABLE db: test name: a1 (Waiting
for table metadata lock)
2019-09-17 14:47:31 139664119084800 [Note] WSREP: wsrep_abort_thd, by: 139664119084800, victim: 139664119392000
2019-09-17 14:47:31 139664119084800 [Note] WSREP: abort transaction: BF: truncate a1 victim: (null)
2019-09-17 14:47:31 139664119084800 [Note] WSREP: cluster conflict due to high priority abort for threads:
2019-09-17 14:47:31 139664119084800 [Note] WSREP: Winning thread:
THD: 15, mode: total order, state: executing, conflict: no conflict, seqno: 18
SQL: truncate a1
2019-09-17 14:47:31 139664119084800 [Note] WSREP: Victim thread:
THD: 14, mode: local, state: idle, conflict: no conflict, seqno: -1
does the ddl abort the dml or select transcation in the galera is the default behavior or any params can control it?
in the mariadb10.1.14 ,the ddl will wait for the mdl.
this does not happen in the standalone server env,in that,the ddl will always wait the mdl until the select is complete .
thanks a lot!