@@ -63,3 +63,36 @@ transaction operations.
6363
6464.. include:: /includes/extracts/transactions-operations-catalog-tip.rst
6565
66+ .. _txn-prod-considerations-ddl:
67+
68+ Pending DDL Operations and Transactions
69+ ---------------------------------------
70+
71+ If a multi-document transaction is in progress, new DDL operations that
72+ affect the same database(s) wait behind the transaction. While these
73+ pending DDL operations exist, new transactions that access the same
74+ database as the pending DDL operations cannot obtain the required locks
75+ and will abort after waiting
76+ :parameter:`maxTransactionLockRequestTimeoutMillis`. In addition, new
77+ non-transaction operations that access the same database will block
78+ until they reach their ``maxTimeMS`` limit.
79+
80+ To illustrate, compare the following two situations:
81+
82+ Consider a situation where an in-progress transaction performs various
83+ CRUD operations on the ``employees`` collection in the ``hr`` database.
84+ While that transaction is in progress, a separate transaction that
85+ accesses the ``foobar`` collection in the ``hr`` database can start and
86+ complete.
87+
88+ However, consider a situation where an in-progress transaction performs
89+ various CRUD operations on the ``employees`` collection in the ``hr``
90+ database and a separate DDL operation is issued to create an index on
91+ the ``fluffy`` collection in the ``hr`` database. The DDL operation
92+ waits for the transaction to finish.
93+
94+ While the DDL operation is pending, a new transaction attempts to
95+ access the ``foobar`` collection in the ``hr`` database. If the DDL
96+ operation remains pending for
97+ :parameter:`maxTransactionLockRequestTimeoutMillis`, the new
98+ transaction aborts.
0 commit comments