Documentation — Commands reference
Locks a table or the cluster. unlock removes the lock.
lock table TABLE_NAME;
unlock table TABLE_NAME;
lock cluster;
unlock cluster;
A locked table refuses all writes: insert, update, delete, truncate. Reading remains possible. You need the LOCK privilege on the table.
Use it to:
dump table requires it);repair table);A locked cluster refuses every change of the dictionary: no new table, user or broker, no change of structure. Only administrators can lock and unlock it. It is required before create masterbroker and drop databroker.
A deployment that ended with failures leaves its table locked. Do not unlock it to use it: see deploy.