Problems with the display of insert query update delete getmore command field values in mongostat

1: when testing the performance of the interface, use mongostats to check the performance of the next mongo. Different document, of the same database are used, but the field values are not as expected.
the first interface is find_one,document assuming D1. You can see that query has a value, while command is displayed normally (if the value of insert_one,insert is also normal)

clipboard.png

find_one_and_updateupsert=true,documentd2,query00commandd2

clipboard.png
looked at the official documents and found no answer. Has anyone studied it?

Aug.20,2021

essentially all operations are Command. But in order to make more sense, the insert/find/update/remove was taken out separately and turned into an insert/query/update/delete display. Getmore is a command for find to batch data when there is too much data. You can think of all operations except these as command.
you can take a look at findAndModify what the action is:

rs0:PRIMARY> db.test.findAndModify
function (args) {
    var cmd = {findandmodify: this.getName()};
    ...

it can be seen that the corresponding Command is findandmodify , which is not on the list of CRUD, so it is uniformly classified as command.

Menu