jstests/sharding/sharded_limit_batchsize.js
/**
 * This function checks that the log on the mongoD never shows the mongoS asking for all documents
 * to be returned.  This occurs if ntoreturn:0 is present in the log.
 */
This function checks that the log on the mongoD never shows the mongoS asking for all documents
to be returned.  This occurs if ntoreturn:0 is present in the log.
This function checks that the log on the mongoD never shows the mongoS asking for all documents to be returned . This occurs if ntoreturn : 0 is present in the log .
function checkLogForBatching(log) {
	var haveGetMore = false;
	log.forEach(function(logline) {
		if (logline.search("getmore") != 0) {
			haveGetMore = true;
			assert.eq(logline.search("ntoreturn:0"), -1)
		}
	});
	assert.eq(haveGetMore, true);
}
function checkLogForBatching ( log ) { var haveGetMore = false ; log . forEach ( function ( logline ) { if ( logline . search ( "getmore" ) != 0 ) { haveGetMore = true ; assert . eq ( logline . search ( "ntoreturn:0" ) , - 1 ) } } ) ; assert . eq ( haveGetMore , true ) ; }
This function checks that the log on the mongoD never shows the mongoS asking for all documents
 to be returned.
This function checks that the log on the mongoD never shows the mongoS asking for all documents to be returned .
//All ntoreturn should be the batch size, not 0