Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11954

Ambiguous terminology is used to describe locking during background index builds

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Gone away
    • Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • None
    • Server
    • 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)
      					}
      				}
      

      ----------------------------

      Description

      Scope of changes (files that need work and how much)

      Impact to other docs outside of this product

      MVP (work and date?)

      Resources (e.g. Scope Docs, Invision)

      Attachments

        Activity

          People

            ravind.kumar Ravind Kumar (Inactive)
            dmitry.ryabtsev@mongodb.com Dmitry Ryabtsev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              47 weeks, 2 days ago