[SERVER-16556] db.currentOp reports operations with incorrect namespace values Created: 15/Dec/14  Updated: 18/Dec/14  Resolved: 17/Dec/14

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: 2.8.0-rc2
Fix Version/s: 2.8.0-rc3

Type: Bug Priority: Major - P3
Reporter: John Morales Assignee: J Rassi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

While polling db.currentOp(true), I observed entries that appear to contain a mismatched "ns" for the operation described.

For example:

{
        "desc" : "conn8872",
        "threadId" : "0x6fb70080",
        "connectionId" : 8872,
        "opid" : 1699027235,
        "active" : true,
        "secs_running" : 0,
        "microsecs_running" : NumberLong(226281),
        "op" : "query",
        "ns" : "mmsdbpings.config.hostDelectedCache",
        "query" : {
                "findandmodify" : "tmp.alertJobs",
                "query" : {
                        "_id" : ObjectId("548ef33de4b01c3152fca506"),
                        "hostsDispatched" : {
                                "$ne" : null
                        },
                        "lock" : null
                },
                "update" : {
                        "$set" : {
                                "lock" : ObjectId("548ef34de4b01733bdb6778d"),
                                "locked" : ISODate("2014-12-15T14:42:21.161Z")
                        }
                }
        },
        "client" : "10.10.0.229:35216",
        "numYields" : 0,
        "locks" : {
                "Global" : "w",
                "Database" : "w",
                "Collection" : "W"
        },
        "waitingForLock" : true,
        "lockStats" : {
 
        }
}

Note the "ns" : "mmsdbpings.config.hostDelectedCache" while the target collection of the findandmodify is "tmp.alertJobs". This findandmodify is a "known" operation for the application, however the actual namespace on which it's performed is "alerts.tmp.alertJobs" - a different database altogether from the indicated "mmsdbpings".

I also noticed apparent mismatches for "update" operations on a collection that I'm confident receives no update ops.



 Comments   
Comment by Githook User [ 17/Dec/14 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-16556 CurOp::reset() needs to clear _ns

Fixes regression introduced in de724781.
Branch: master
https://github.com/mongodb/mongo/commit/f46ff140de92e43c34bace43be971fd903ac11d9

Generated at Thu Feb 08 03:41:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.