Mongodb 如何查找索引生成操作的opid

Mongodb 如何查找索引生成操作的opid,mongodb,Mongodb,我想为集合添加索引(data\u 04),但在mongo shell中执行之后 mongos> db.data_04.createIndex({"column1":1, "column":1,cacheDataTime:1 }) 但过了相当长的时间,它仍然没有结束。所以我想明确地杀死它并在后台创建它。但我首先应该知道它的opid,我试着以下面的方式一无所获地输出 # The following example returns information on index creation o

我想为集合添加索引(
data\u 04
),但在mongo shell中执行之后

mongos> db.data_04.createIndex({"column1":1, "column":1,cacheDataTime:1 })
但过了相当长的时间,它仍然没有结束。所以我想明确地杀死它并在后台创建它。但我首先应该知道它的
opid
,我试着以下面的方式一无所获地输出

# The following example returns information on index creation operations:
mongos> db.currentOp(
...     {
...       $or: [
...         { op: "query", "query.createIndexes": { $exists: true } },
...         { op: "insert", ns: /\.system\.indexes\b/ }
...       ]
...     }
... )

"inprog" : [ ],
"ok" : 1

mongos> db.currentOp(
...    {
...      "active" : true,
...      "ns" : /data_04/
...    }
... )

"inprog" : [ ],
"ok" : 1

那么,索引创建操作的opid有什么问题以及如何查找呢

db.currentOp(
    {
      $or: [
        { op: "command", "query.createIndexes": { $exists: true } },
        { op: "insert", ns: /\.system\.indexes\b/ }
      ]
    }
)

   {
    "desc" : "conn292",
    "threadId" : "140288792557312",
    "connectionId" : 292,
    "client_s" : "10.47.50.216:39380",
    "active" : true,
    "opid" : "shard1:2005849",
    "secs_running" : 42,
    "microsecs_running" : NumberLong(42991403),
    "op" : "command",
    "ns" : "mydata.$cmd",
    "query" : {
        "createIndexes" : "data_04",
        "indexes" : [
            {
                "key" : {
                    "column1" : 1,
                    "column" : 1,
                    "cacheDataTime" : 1
                },
                "name" : "column1_1_column_1_cacheDataTime_1",
                "background" : true
            }
        ]
    },
    "msg" : "Index Build (background) Index Build (background): 41209/1447644 2%",
    "progress" : {
        "done" : 41209,
        "total" : 1447644
    },
    "numYields" : 1369,
    "locks" : {
        "Global" : "w",
        "Database" : "w",
        "Collection" : "w"
    },
    "waitingForLock" : false,
    "lockStats" : {
        "Global" : {
            "acquireCount" : {
                "r" : NumberLong(1370),
                "w" : NumberLong(1370)
            }
        },
        "Database" : {
            "acquireCount" : {
                "w" : NumberLong(1370),
                "W" : NumberLong(1)
            }
        },
        "Collection" : {
            "acquireCount" : {
                "w" : NumberLong(1370)
            }
        }
    }
}