summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/update.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/update.cpp')
-rw-r--r--src/mongo/db/exec/update.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/mongo/db/exec/update.cpp b/src/mongo/db/exec/update.cpp
index b06197460ac..7fca4f3906b 100644
--- a/src/mongo/db/exec/update.cpp
+++ b/src/mongo/db/exec/update.cpp
@@ -37,11 +37,11 @@
#include "mongo/db/exec/scoped_timer.h"
#include "mongo/db/exec/working_set_common.h"
#include "mongo/db/exec/write_stage_common.h"
-#include "mongo/db/service_context.h"
#include "mongo/db/op_observer.h"
#include "mongo/db/ops/update_lifecycle.h"
#include "mongo/db/query/explain.h"
#include "mongo/db/repl/replication_coordinator_global.h"
+#include "mongo/db/service_context.h"
#include "mongo/stdx/memory.h"
#include "mongo/util/log.h"
#include "mongo/util/scopeguard.h"
@@ -146,7 +146,8 @@ Status validateDollarPrefixElement(const mb::ConstElement elem, const bool deep)
// not an okay, $ prefixed field name.
return Status(ErrorCodes::DollarPrefixedFieldName,
str::stream() << "The dollar ($) prefixed field '" << elem.getFieldName()
- << "' in '" << mb::getFullName(elem)
+ << "' in '"
+ << mb::getFullName(elem)
<< "' is not valid for storage.");
}
@@ -198,7 +199,8 @@ Status storageValid(const mb::ConstElement& elem, const bool deep) {
// Field name cannot have a "." in it.
return Status(ErrorCodes::DottedFieldName,
str::stream() << "The dotted field '" << elem.getFieldName() << "' in '"
- << mb::getFullName(elem) << "' is not valid for storage.");
+ << mb::getFullName(elem)
+ << "' is not valid for storage.");
}
}
@@ -340,9 +342,12 @@ inline Status validate(const BSONObj& original,
return Status(ErrorCodes::ImmutableField,
mongoutils::str::stream()
<< "After applying the update to the document with "
- << newIdElem.toString() << ", the '" << current.dottedField()
+ << newIdElem.toString()
+ << ", the '"
+ << current.dottedField()
<< "' (required and immutable) field was "
- "found to have been removed --" << original);
+ "found to have been removed --"
+ << original);
}
} else {
// Find the potentially affected field in the original document.
@@ -358,7 +363,8 @@ inline Status validate(const BSONObj& original,
mongoutils::str::stream()
<< "After applying the update to the document {"
<< (oldIdElem.ok() ? oldIdElem.toString() : newIdElem.toString())
- << " , ...}, the (immutable) field '" << current.dottedField()
+ << " , ...}, the (immutable) field '"
+ << current.dottedField()
<< "' was found to be an array or array descendant.");
}
currElem = currElem.parent();
@@ -369,8 +375,10 @@ inline Status validate(const BSONObj& original,
return Status(ErrorCodes::ImmutableField,
mongoutils::str::stream()
<< "After applying the update to the document {"
- << oldElem.toString() << " , ...}, the (immutable) field '"
- << current.dottedField() << "' was found to have been altered to "
+ << oldElem.toString()
+ << " , ...}, the (immutable) field '"
+ << current.dottedField()
+ << "' was found to have been altered to "
<< newElem.toString());
}
}