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

$currentOp not display any session when not add getSiblingDB('admin')

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.4.12
    • Component/s: None
    • ALL

      hi:
      mongodb is sharding cluster.
      when i execute db.aggreagte([{$currentOp:{allUsers:true}}])
      not display any session on current db is admin.
      when i add getSiblingDB('admin') it is work well.

      the following is result:so is it a bug for it ?
      mongos> db
      amdin
      mongos> db.aggregate([{$currentOp:{allUsers:true}},{$match:{msg:{$regex:"^Index"}}},{$project:{shard:1,op:1,msg:1}}])
      mongos> db.getSiblingDB('admin').aggregate([{$currentOp:{allUsers:true}},{$match:{msg:{$regex:"^Index"}}},{$project:{shard:1,op:1,msg:1}}])

      { "shard" : "shard4", "op" : "command", "msg" : "Index Build: scanning collection Index Build: scanning collection: 1149663253/1313591868 87%" } { "shard" : "shard7", "op" : "command", "msg" : "Index Build: scanning collection Index Build: scanning collection: 1213428254/1302083375 93%" } { "shard" : "shard2", "op" : "command", "msg" : "Index Build: scanning collection Index Build: scanning collection: 1136706581/1300855813 87%" } { "shard" : "shard8", "op" : "command", "msg" : "Index Build: scanning collection Index Build: scanning collection: 805790473/1301249397 61%" } { "shard" : "shard6", "op" : "command", "msg" : "Index Build: scanning collection Index Build: scanning collection: 1184817591/1301305254 91%" } { "shard" : "shard5", "op" : "command", "msg" : "Index Build: scanning collection Index Build: scanning collection: 1190047539/1306673254 91%" } { "shard" : "shard3", "op" : "command", "msg" : "Index Build: scanning collection Index Build: scanning collection: 1138145372/1303734226 87%" } { "shard" : "shard1", "op" : "command", "msg" : "Index Build: scanning collection Index Build: scanning collection: 1048140154/1304149579 80%" }

      mongos> db
      amdin

            Assignee:
            edwin.zhou@mongodb.com Edwin Zhou
            Reporter:
            601290552@qq.com jing xu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: