In the legacy OP_QUERY find protocol, an ntoreturn of 1 is special because it requires the server to close the cursor after retrieving the result. The new mongos query path introduced in 3.2 fails to handle this case correctly. This can be reproduced with the following script, run through a shell with --readMode legacy:
db.c.drop(); db.c.insert({_id: 1}); db.c.insert({_id: 2}); var cursor = db.c.find().limit(1); if (cursor.hasNext()) { cursor.next(); } // After retrieving the first result, serverStatus shows that // mongos has left its cursor open. db.serverStatus().metrics.cursor; // If you ask the cursor whether it has another result, // the shell will issue a getMore. In response to the getMore, // mongos will close the cursor and return an empty batch. cursor.hasNext(); db.serverStatus().metrics.cursor;
The mongod query path implements this correctly. If you run the above script directly against a mongod, the initial serverStatus will show that the mongod does not have an open cursor.