diff options
author | Benety Goh <benety@mongodb.com> | 2020-11-21 06:15:28 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-21 11:47:29 +0000 |
commit | 65c4f3bcf915d6fe3ca6fa620fe0b5b9b0a0d405 (patch) | |
tree | 7f41cb6d437fca6d43d0d6125a6dbd6640260404 | |
parent | c65e9fc4390adfde4f3f551d5fcdd0415e028a6b (diff) | |
download | mongo-65c4f3bcf915d6fe3ca6fa620fe0b5b9b0a0d405.tar.gz |
SERVER-52529 time-series upserts should bypass document validation
-rw-r--r-- | src/mongo/db/commands/write_commands/write_commands.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/commands/write_commands/write_commands.cpp b/src/mongo/db/commands/write_commands/write_commands.cpp index 42951d9072b..f6ded3a257f 100644 --- a/src/mongo/db/commands/write_commands/write_commands.cpp +++ b/src/mongo/db/commands/write_commands/write_commands.cpp @@ -474,8 +474,9 @@ private: BSONObjBuilder builder; builder.append(write_ops::Update::kCommandName, bucketsNs.coll()); - builder.append(write_ops::Update::kBypassDocumentValidationFieldName, - _batch.getBypassDocumentValidation()); + // The schema validation configured in the bucket collection is intended for direct + // operations by end users and is not applicable here. + builder.append(write_ops::Update::kBypassDocumentValidationFieldName, true); builder.append(write_ops::Update::kOrderedFieldName, _batch.getOrdered()); if (auto stmtId = _batch.getStmtId()) { builder.append(write_ops::Update::kStmtIdFieldName, *stmtId); |