-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Browser Module
-
None
-
Environment:OS:
node.js / npm versions:
Additional info:
-
3
-
Developer Tools
Description
What is going wrong?
The output of cursorId from the "$currentOp" aggregation stage differs between a Mongo Shell opened in Compass and a Mongo Shell opened from the command line.
Steps to Reproduce
Perform the steps below using the Mongo Shell built in Compass 1.44.4 and Mongo Shell 2.3.1
- Open a Mongo Shell using Compass 1.44.4 and a Mongo Shell from the command line to the same cluster.
- Open a change stream on test.collection to create an idle cursor
use test db.collection.watch();
- Run $currentOp to list idle cursors
db.getSiblingDB("admin").aggregate([ { "$currentOp": { "idleCursors": true } }, { "$match": { "type": "idleCursor", "ns": "test.collection" } }, { "$project": { "cursor.cursorId": 1, "ns": 1 } } ]);
- In the Mongo Shell from Compass we see the following output:
{ ns: 'test.collection', cursor: { cursorId: 5467380098166794000 } }
- In the Mongo Shell from the command line however:
{ ns: 'test.collection', cursor: { cursorId: Long('5467380098166794545') } }
Expected Results
Output of cursorId should be of type Long in Mongo Shell from Compass
Actual Results
It appears that Mongo Shell in Compass is somehow converting the Long value and rounding down the value from Long('5467380098166794545') to 5467380098166794000