[SERVER-14223] currentOp shows insert as op query Created: 10/Jun/14  Updated: 06/Dec/22  Resolved: 29/Jan/19

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: 2.6.1
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Asya Kamsky Assignee: Backlog - Query Team (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query
Operating System: ALL
Participants:

 Description   

Output from db.currentOp() included:

{
	"opid" : "next_1:1219394635",
	"active" : true,
	"secs_running" : 0,
	"op" : "query",
	"ns" : "",
	"query" : {
		"insert" : "followers",
		"documents" : [
			{
				"_id" : ObjectId("53977bb4e4b0036245638a96"),
				"_f" : "30922",
				"_t" : "28116"
			}
		],
		"ordered" : true,
		"metadata" : {
			"shardName" : "next_1",
			"shardVersion" : [
				Timestamp(0, 0),
				ObjectId("000000000000000000000000")
			],
			"session" : NumberLong(0)
		}
	},
	"client_s" : "10.109.139.16:53207",
	"desc" : "conn431",
	"threadId" : "0x7f61268a6700",
	"connectionId" : 431,
	"waitingForLock" : false,
	"numYields" : 0,
	"lockStats" : {
		"timeLockedMicros" : {
 
		},
		"timeAcquiringMicros" : {
 
		}
	}
}

This query is actually an insert? Not sure which component is lying here...



 Comments   
Comment by Asya Kamsky [ 29/Jan/19 ]

This is no longer an issue, it was likely fixed as part of SERVER-23128 (Refactor write cmd path) for MongoDB 3.4.

Comment by James Wahlin [ 29/Jan/19 ]

This was likely fixed as part of SERVER-23128 (Refactor write cmd path) for MongoDB 3.4.

Comment by Asya Kamsky [ 28/Jan/19 ]

james.wahlin as of when was this no longer the case? I'm fine closing it but I'd prefer to close it as a dup of the ticket that fixed this.

Comment by James Wahlin [ 25/Jan/19 ]

This should no longer be the case. We have this test that confirms that the "op" field for an insert has the value of "insert". I suspect the write command overhaul we did a few years ago fixed.

asya - are you OK with closing this?

Comment by Githook User [ 29/Oct/14 ]

Author:

{u'username': u'GeertBosch', u'name': u'Geert Bosch', u'email': u'geert@mongodb.com'}

Message: SERVER-14223: Fix collection stats for insert

Also rewrite top.js to actually test the stats
Branch: master
https://github.com/mongodb/mongo/commit/1b9d93acfaee902dacafc5ca35ac12f0219a170d

Comment by Eric Milkie [ 16/Jun/14 ]

Need to re-evaluate this after we're done with the churn in this area of the codebase; curop code might be radically changed after 2.8 anyway.

Comment by Daniel Pasette (Inactive) [ 14/Jun/14 ]

currentOp() is showing the write command itself, which is registered as a query. This is only cosmetic. The write ops are being recorded properly in serverStatus.

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