mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
log the collection name as well
This commit is contained in:
parent
2393123c66
commit
4d351c23f7
@ -224,13 +224,19 @@ namespace mongo {
|
|||||||
BSONObjIterator fields(op.embeddedObject());
|
BSONObjIterator fields(op.embeddedObject());
|
||||||
while(fields.more()){
|
while(fields.more()){
|
||||||
const string field = fields.next().fieldName();
|
const string field = fields.next().fieldName();
|
||||||
uassert(13123, "Can't modify shard key's value", ! manager->getShardKey().partOfShardKey(field));
|
uassert(13123,
|
||||||
|
str::stream() << "Can't modify shard key's value field" << field
|
||||||
|
<< " for collection: " << manager->getns(),
|
||||||
|
! manager->getShardKey().partOfShardKey(field));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ( manager->hasShardKey( toupdate ) ){
|
} else if ( manager->hasShardKey( toupdate ) ){
|
||||||
uassert( 8014, "cannot modify shard key", manager->getShardKey().compare( query , toupdate ) == 0 );
|
uassert( 8014,
|
||||||
|
str::stream() << "cannot modify shard key for collection: " << manager->getns(),
|
||||||
|
manager->getShardKey().compare( query , toupdate ) == 0 );
|
||||||
} else {
|
} else {
|
||||||
uasserted(12376, "shard key must be in update object");
|
uasserted(12376,
|
||||||
|
str::stream() << "shard key must be in update object for collection: " << manager->getns() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user