summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops
diff options
context:
space:
mode:
authorYuhong Zhang <danielzhangyh@gmail.com>2021-09-29 22:26:32 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-09-29 22:56:26 +0000
commit7591af2652cd1d00f9255033dc5ec3c3d82deca3 (patch)
tree3e11f2a45e09155beca9ad66bbce522c49623b36 /src/mongo/db/ops
parenta6810aa4a19bc5c0330494778e73e6c7cbcc21f8 (diff)
downloadmongo-7591af2652cd1d00f9255033dc5ec3c3d82deca3.tar.gz
SERVER-60156 Add a way to bypass storageValid() for time-series updates
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r--src/mongo/db/ops/parsed_update.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/ops/parsed_update.cpp b/src/mongo/db/ops/parsed_update.cpp
index f36bee843fb..2d4df260b1a 100644
--- a/src/mongo/db/ops/parsed_update.cpp
+++ b/src/mongo/db/ops/parsed_update.cpp
@@ -182,6 +182,11 @@ void ParsedUpdate::parseUpdate() {
_driver.setCollator(_expCtx->getCollator());
_driver.setLogOp(true);
_driver.setFromOplogApplication(_request->isFromOplogApplication());
+ // Time-series operations will not result in any documents with dots or dollars fields.
+ if (auto source = _request->source(); source == OperationSource::kTimeseriesInsert ||
+ source == OperationSource::kTimeseriesUpdate) {
+ _driver.setSkipDotsDollarsCheck(true);
+ }
_driver.parse(_request->getUpdateModification(),
_arrayFilters,