blob: 1a3f5ef03dd9dd2f1b140087a9649190e609639f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
'use strict';
/**
* indexed_noindex.js
*
* Defines a modifier for indexed workloads that drops the index, specified by
* $config.data.getIndexSpec(), at the end of the workload setup.
*/
function indexedNoindex($config, $super) {
$config.setup = function(db, collName, cluster) {
$super.setup.apply(this, arguments);
var res = db[collName].dropIndex(this.getIndexSpec());
assertAlways.commandWorked(res);
this.indexExists = false;
};
// Remove the shard key for the no index tests
delete $config.data.shardKey;
return $config;
}
|