mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-49089 fail with MovePrimaryInProgress in MapReduce command
This commit is contained in:
parent
0497a5fe38
commit
15588728dc
@ -45,6 +45,13 @@ function createCollections() {
|
||||
assert.commandWorked(db.adminCommand({shardCollection: dbName + '.shardedBar', key: {_id: 1}}));
|
||||
}
|
||||
|
||||
function mapFunc() {
|
||||
emit(this.a, 1);
|
||||
}
|
||||
function reduceFunc(key, values) {
|
||||
return Array.sum(values);
|
||||
}
|
||||
|
||||
function buildCommands(collName) {
|
||||
const commands = [
|
||||
{command: {insert: collName, documents: [{a: 10}]}, alwaysFail: false},
|
||||
@ -80,6 +87,15 @@ function buildCommands(collName) {
|
||||
{aggregate: collName, cursor: {}, pipeline: [{$match: {}}, {$out: "testOutColl"}]},
|
||||
alwaysFail: true
|
||||
},
|
||||
{
|
||||
command: {
|
||||
mapReduce: collName,
|
||||
map: mapFunc,
|
||||
reduce: reduceFunc,
|
||||
out: {merge: "testOutMR", db: dbName}
|
||||
},
|
||||
alwaysFail: true
|
||||
},
|
||||
{command: {create: "testCollection"}, alwaysFail: true},
|
||||
{
|
||||
command: {collMod: "viewOnFoo", viewOn: "unshardedFoo", pipeline: [{$match: {_id: 1}}]},
|
||||
|
Loading…
Reference in New Issue
Block a user