Details
-
Bug
-
Resolution: Gone away
-
Minor - P4
-
None
-
None
Description
----------------------------
Original Description
Here in the documentation we currently say that:
- A foreground index build on a primary requires a DB lock. It replicates as a foreground index build on replica set secondaries, and the replication worker takes a global DB lock that queues reads and writes to all databases on the indexing server.
- A background index build on a primary replicates as background index builds on secondaries. The replication worker does not take a global DB lock, and secondary reads are not affected.
It is not entirely clear what kind of lock we mean here as (using db.currentOp output as a reference) there are three main types of locks:
- Global
- Database
- Collection
There is no "global DB lock". We should clarify what kind of lock (should be just "global lock", I'm guessing) we are talking about here exactly.
|
"db.currentOp()" |
|
Show all |
"lockStats" : {
|
"Global" : {
|
"acquireCount" : {
|
"w" : NumberLong(35935)
|
},
|
"acquireWaitCount" : {
|
"w" : NumberLong(16)
|
},
|
"timeAcquiringMicros" : {
|
"w" : NumberLong(1971869)
|
}
|
},
|
"Database" : {
|
"acquireCount" : {
|
"w" : NumberLong(35935),
|
},
|
"acquireWaitCount" : {
|
"w" : NumberLong(1),
|
"W" : NumberLong(1)
|
},
|
"timeAcquiringMicros" : {
|
"w" : NumberLong(27),
|
"W" : NumberLong(137317)
|
}
|
},
|
"Collection" : {
|
"acquireCount" : {
|
"w" : NumberLong(35935)
|
}
|
}
|
----------------------------