blob: 8751e99fd214cb29f0654be6e76766982334ec7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
'use strict';
/**
* findAndModify_upsert_collscan.js
*
* Each thread repeatedly performs the findAndModify command, specifying
* upsert as either true or false. A single document is selected (or
* created) based on the 'query' specification, and updated using the
* $push operator.
*
* Forces 'sort' to perform a collection scan by using $natural.
*/
load('jstests/concurrency/fsm_libs/extend_workload.js'); // for extendWorkload
load('jstests/concurrency/fsm_workloads/findAndModify_upsert.js'); // for $config
var $config = extendWorkload($config, function($config, $super) {
$config.data.sort = {$natural: 1};
return $config;
});
|