Instant DDL
About Instant DDL as of MySQL 8.0.
Due to the exclusive metadata lock requirements outlined above, an online DDL operation may have to wait for concurrent transactions that hold metadata locks on the table to commit or rollback. Transactions started before or during the DDL operation can hold metadata locks on the table being altered. In the case of a long running or inactive transaction, an online DDL operation can time out waiting for an exclusive metadata lock. Additionally, a pending exclusive metadata lock requested by an online DDL operation blocks subsequent transactions on the table.
An example scenario that online DDL operation and subsequent transactions on the table are blocked is described on Online DDL and Metadata Locks.
If you want to avoid possibility that online DDL blocks subsequent transactions due to a pending exclusive metadata lock, consider to set lock_wait_timeout and max_execution_time to values small enough.
Metadata Locking
The Performance Schema metadata_locks table exposes metadata lock information, which can be useful for seeing which sessions hold locks, are blocked waiting for locks, and so forth