[SERVER-24341] Find on admin.$cmd.sys.inprog asserts on top-level $query field Created: 01/Jun/16  Updated: 14/Jul/16  Resolved: 20/Jun/16

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: 3.0.12
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-6767 Interpret $query as special so you ca... Closed
Related
related to PHPC-705 Do not unnecessarily wrap filters in ... Closed
is related to SERVER-17951 db.currentOp() fails with read prefer... Closed
Operating System: ALL
Participants:

 Description   

Emulating the db.currentOp() shell method on older MongoDB versions (without the currentOp command) requires a query to the admin database's $cmd.sys.inprog collection. I encountered the following assertion failure when attempting to query the current op from the PHPC driver:

AssertionException handling request, closing client connection: 16810 bad query: BadValue unknown top level operator: $query

From the driver's perspective, the socket is closed and we time out while attempting to read a response.

The assertion is no doubt due to logic in the PHPC driver that always includes the filter under a top-level $query field, even if the query contains no other modifiers necessitating so (e.g. $orderby, modifiers). While this is certainly something we can fix in PHPC, I wonder if the the server should still relax its assertion here.

I've linked this to SERVER-17951, where the server was rejecting similar queries due to a top-level $readPreference field. If this is deemed worthy of a fix, you may want to also investigate the killOp and fsyncUnlock operations, which were also addressed in SERVER-17951.



 Comments   
Comment by Ramon Fernandez Marina [ 20/Jun/16 ]

jmikola, if I'm reading this ticket correctly this is a duplicate of SERVER-6767, which was closed as "Won't Fix" after the introduction of a new format for commands in SERVER-15176.

I'm therefore going to close this ticket as a duplicate. If I'm missing something or you disagree please reopen.

Thanks,
Ramón.

Generated at Thu Feb 08 04:06:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.