PXC node stalls due to lock waiting TOI on parent table and waiting metadata lock on sub tables

Description

Running LOCK TABLES and DDL on the parent table hangs the PXC cluster.

The processlist of node1 running DDL are

The DDL connection is waiting for TOI, and the applier threads are waiting for metadata lock.

The processlist of node2 running DML queries

Reproduce

  1. deploy pxc

  1. run sysbench on node2

  1. create a parent table

  1. add FK's to the sysbench table

  1. run DDL on node1

Environment

None

Activity

Matthew Boehm 2 days ago

Hmm. This is interesting. I looked at the ptosc source code and found the single ‘LOCK TABLES …’ line. There’s no exceptions/checks for PXC. There’s no flags for PXC other than flow-control monitoring. This means that if your PXC is in ENFORCING mode (the default), then ptosc won’t work. This seems more and more like a ptosc bug than a PXC bug. Tagging (PXC) and (toolkit) for their comments.

jinyou.ma 3 days ago

Thank you for your explanation.

I saw this issue while running pt-online-schema-change

  • the state

If it is not a PXC bug, should I tag it as a pt-online-schema-change issue?

Matthew Boehm 3 days ago

This isn’t a bug, IMO. You disabled PXC protection (pxc_strict_mode=PERMISSIVE) for running unsupported operations (LOCK TABLES).

”The following undesirable operations..” → LOCK TABLES

When using TOI mode, you do not lock tables. You simply execute the ALTER, and it will take precedence throughout the cluster.

Details

Assignee

Reporter

Needs QA

Yes

Affects versions

Priority

Smart Checklist

Created 4 days ago
Updated 2 days ago