Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-36759

Overhaul currentOp output for createIndexes

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Storage Execution

      The output for createIndexes used to look like this before removing MMAPv1:

      
          "inprog" : [
              {
                  "host" : "delphi:28022",
                  "desc" : "repl index builder 1",
                  "active" : true,
                  "currentOpTime" : "2018-08-20T08:31:38.210-0400",
                  "opid" : 225,
                  "secs_running" : NumberLong(0),
                  "microsecs_running" : NumberLong(13816),
                  "op" : "none",
                  "ns" : "test.system.indexes",
                  "command" : {
                      "v" : 2,
                      "key" : {
                      "x" : 1
                      },
                      "name" : "x_1",
                      "background" : true,
                      "ns" : "test.index_bigkeys_downgrade_during_index_build"
                  },
                  "numYields" : 0,
                  "locks" : {
                      "Global" : "w",
                      "Database" : "W"
                  },
                  "waitingForLock" : false,
                  "lockStats" : {
                      "Global" : {
                      "acquireCount" : {
                      "w" : NumberLong(1)
                      }
                      },
                      "Database" : {
                      "acquireCount" : {
                      "W" : NumberLong(1)
                      }
                      }
                  }
              }
          ],
          "ok" : 1,
          "$clusterTime" : {
              "clusterTime" : Timestamp(1534768298, 2),
              "signature" : {
                  "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                  "keyId" : NumberLong(0)
              }
          },
          "operationTime" : Timestamp(1534768298, 1)
      }
      

      It is basically only intelligible because of the ns field value of "<db>.system.indexes", and that's only to engineers, not users.
      After SERVER-36015, it looks like this:

      {
          "inprog" : [
              {
                  "host" : "delphi:28022",
                  "desc" : "repl index builder 1",
                  "active" : true,
                  "currentOpTime" : "2018-08-20T10:29:38.499-0400",
                  "opid" : 223,
                  "op" : "none",
                  "ns" : "",
                  "command" : {
                      "v" : 2,
                      "key" : {
                          "x" : 1
                      },
                      "name" : "x_1",
                      "background" : true,
                      "ns" : "test.index_bigkeys_downgrade_during_index_build"
                  },
                  "msg" : "Index Build (background) Index Build (background): 0/10 0%",
                  "progress" : {
                      "done" : 0,
                      "total" : 10
                  },
                  "numYields" : 0,
                  "locks" : {
                      "Global" : "w",
                      "Database" : "w",
                      "Collection" : "w"
                  },
                  "waitingForLock" : false,
                  "lockStats" : {
                      "Global" : {
                          "acquireCount" : {
                              "w" : NumberLong(1)
                          }
                      },
                      "Database" : {
                          "acquireCount" : {
                              "w" : NumberLong(1),
                              "W" : NumberLong(1)
                          }
                      },
                      "Collection" : {
                          "acquireCount" : {
                              "w" : NumberLong(1)
                          }
                      }
                  }
              }
          ],
          "ok" : 1,
          "$clusterTime" : {
              "clusterTime" : Timestamp(1534775378, 2),
              "signature" : {
                  "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                  "keyId" : NumberLong(0)
              }
          },
          "operationTime" : Timestamp(1534775378, 1)
      }
      

      This entry should say "createIndexes" somewhere. The code starting point to investigate how currentOp puts this entry together – and thus where to put the code to improve it – is here: I tracked that code starting from here, but I didn't go any further.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: