mirror of https://github.com/mongodb/mongo
SERVER-110061 Replace specific error codes with BSONObjectTooLarge (#42601)
GitOrigin-RevId: f64b5d7813213e71c2a4b2dbd4a7e8fe7bc570a4
This commit is contained in:
parent
8030ef7da2
commit
1a0139d7f0
|
|
@ -79,7 +79,7 @@ assert.commandFailedWithCode(
|
|||
ordered: true,
|
||||
updates: [{q: {_id: objectId}, u: {_id: objectId, x: largerThanMaxString}, upsert: true}],
|
||||
}),
|
||||
17420,
|
||||
ErrorCodes.BSONObjectTooLarge,
|
||||
);
|
||||
|
||||
coll = db.getCollection(collNamePrefix + "update_over_size_limit");
|
||||
|
|
@ -91,5 +91,5 @@ assert.commandFailedWithCode(
|
|||
ordered: true,
|
||||
updates: [{q: {_id: objectId}, u: {$set: {x: largerThanMaxString}}}],
|
||||
}),
|
||||
[17419, ErrorCodes.BSONObjectTooLarge],
|
||||
ErrorCodes.BSONObjectTooLarge,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ BSONObj UpdateStage::transformAndUpdate(const Snapshotted<BSONObj>& oldObj,
|
|||
|
||||
newObj = _doc.getObject();
|
||||
if (!DocumentValidationSettings::get(opCtx()).isInternalValidationDisabled()) {
|
||||
uassert(17419,
|
||||
uassert(ErrorCodes::BSONObjectTooLarge,
|
||||
str::stream() << "Resulting document after update is larger than "
|
||||
<< BSONObjMaxUserSize,
|
||||
newObj.objsize() <= BSONObjMaxUserSize);
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ BSONObj UpsertStage::_produceNewDocumentForInsert() {
|
|||
|
||||
auto newDocument = _doc.getObject();
|
||||
if (!DocumentValidationSettings::get(opCtx()).isInternalValidationDisabled()) {
|
||||
uassert(17420,
|
||||
uassert(ErrorCodes::BSONObjectTooLarge,
|
||||
str::stream() << "Document to upsert is larger than " << BSONObjMaxUserSize,
|
||||
newDocument.objsize() <= BSONObjMaxUserSize);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue