@@ -122,6 +122,8 @@ function.
122122
123123Two kinds of locks enforce correctness of replicated DDL with PGD.
124124
125+ ### The global DDL lock
126+
125127The first kind is known as a global DDL lock and is used only when ` ddl_locking = on ` .
126128A global DDL lock prevents any other DDL from executing on the cluster while
127129each DDL statement runs. This ensures full correctness in the general case but
@@ -133,7 +135,9 @@ another DDL command, even if it affects different tables.
133135
134136To acquire a lock on DDL operations, the PGD node executing DDL contacts the
135137other nodes in a PGD group and asks them to grant it the exclusive right to
136- execute DDL. The lock request is sent by the regular replication stream, and the
138+ execute DDL.
139+
140+ The lock request is sent by the regular replication stream, and the
137141nodes respond by the replication stream as well. So it's important that nodes (or
138142at least a majority of the nodes) run without much replication
139143delay. Otherwise it might take a long time for the node to acquire the DDL
@@ -150,6 +154,11 @@ take a long time to acquire the lock. Hence it's preferable to run DDLs from a
150154single node or the nodes that have nearly caught up with replication changes
151155originating at other nodes.
152156
157+ A global DDL Lock has to be granted by a majority of data and witness nodes where a majority is N/2+1
158+ of the eligible nodes. Subscriber-only nodes are not eligible to participate.
159+
160+ ### The global DML lock
161+
153162The second kind is known as a global DML lock or relation DML lock. This kind of lock is used when
154163either ` ddl_locking = on ` or ` ddl_locking = dml ` , and the DDL statement might cause
155164in-flight DML statements to fail. These failures can occur when you add or modify a constraint,
@@ -177,6 +186,10 @@ can be reached and are keeping up reasonably well with the current write rate.
177186If such DDL commands must be performed while a node is down, first remove the
178187down node from the configuration.
179188
189+ A global DML lock is granted when * ALL* the eligible data nodes agree to grant it.
190+ Witness and subscriber-only nodes are not eligible to participate.
191+
192+
180193If a DDL statement isn't replicated, no global locks are acquired.
181194
182195Locking behavior is specified by the ` bdr.ddl_locking ` parameter, as
0 commit comments