-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Replication
-
Replication
-
ALL
-
Storage NYC 2018-11-05
Background index build on secondaries acquires a database lock in X mode and releases it at the beginning, scans the collection with IX lock, and acquires an X lock at the end. The first X lock is acquired by the background job but the running command waits for it, so it won't conflict with transaction operations. The IX lock plays well with transactions. However, the final X lock will cause problem on secondaries.
If the background index build completion is blocked by a prepared transaction and replication application on the same database is blocked by the background index build completion. That's a deadlock. The problem is similar to the 2-phase drop locking issue we've seen in SERVER-34349.
- is related to
-
SERVER-37199 Yield locks of transactions in secondary application
- Closed
-
SERVER-38588 Hybrid index builds do not work when applied concurrently with prepared transactions on secondaries
- Closed