diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2018-05-15 15:20:37 -0400 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2018-05-17 10:28:26 -0400 |
commit | 664e1d9b01dccddeec072b7746d7d4c62931716d (patch) | |
tree | 1a79d178e84cb9a378726e3256f18f1799ba78c8 /src/mongo/db/pipeline/document_source_change_stream.cpp | |
parent | f3439006a717ea1c8b1598b0e68935816e150564 (diff) | |
download | mongo-664e1d9b01dccddeec072b7746d7d4c62931716d.tar.gz |
SERVER-34818 Rename startAtClusterTime to startAtOperationTime
Also changes the type of the argument from an object with a single 'ts'
field to just a Timestamp.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_change_stream.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_change_stream.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mongo/db/pipeline/document_source_change_stream.cpp b/src/mongo/db/pipeline/document_source_change_stream.cpp index 602fd1edd46..f285c29bca2 100644 --- a/src/mongo/db/pipeline/document_source_change_stream.cpp +++ b/src/mongo/db/pipeline/document_source_change_stream.cpp @@ -423,24 +423,24 @@ void parseResumeOptions(const intrusive_ptr<ExpressionContext>& expCtx, } auto resumeAfterClusterTime = spec.getResumeAfterClusterTimeDeprecated(); - auto startAtClusterTime = spec.getStartAtClusterTime(); + auto startAtOperationTime = spec.getStartAtOperationTime(); uassert(40674, "Only one type of resume option is allowed, but multiple were found.", - !(*resumeStageOut) || (!resumeAfterClusterTime && !startAtClusterTime)); + !(*resumeStageOut) || (!resumeAfterClusterTime && !startAtOperationTime)); if (resumeAfterClusterTime) { if (fcv >= ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo40) { warning() << "The '$_resumeAfterClusterTime' option is deprecated, please use " - "'startAtClusterTime' instead."; + "'startAtOperationTime' instead."; } *startFromOut = resumeAfterClusterTime->getTimestamp(); } - // New field name starting in 4.0 is 'startAtClusterTime'. - if (startAtClusterTime) { + // New field name starting in 4.0 is 'startAtOperationTime'. + if (startAtOperationTime) { uassert(ErrorCodes::QueryFeatureNotAllowed, - str::stream() << "The startAtClusterTime option is not allowed in the current " + str::stream() << "The startAtOperationTime option is not allowed in the current " "feature compatibility version. See " << feature_compatibility_version_documentation::kCompatibilityLink << " for more information.", @@ -448,12 +448,12 @@ void parseResumeOptions(const intrusive_ptr<ExpressionContext>& expCtx, uassert(50573, str::stream() << "Do not specify both " - << DocumentSourceChangeStreamSpec::kStartAtClusterTimeFieldName + << DocumentSourceChangeStreamSpec::kStartAtOperationTimeFieldName << " and " << DocumentSourceChangeStreamSpec::kResumeAfterClusterTimeDeprecatedFieldName << " in a $changeStream stage.", !resumeAfterClusterTime); - *startFromOut = startAtClusterTime->getTimestamp(); + *startFromOut = *startAtOperationTime; *resumeStageOut = DocumentSourceShardCheckResumability::create(expCtx, **startFromOut); } } @@ -532,9 +532,9 @@ BSONObj DocumentSourceChangeStream::replaceResumeTokenInCommand(const BSONObj or pipeline[0][DocumentSourceChangeStream::kStageName].getDocument()); changeStreamStage[DocumentSourceChangeStreamSpec::kResumeAfterFieldName] = Value(resumeToken); - // If the command was initially specified with a startAtClusterTime, we need to remove it + // If the command was initially specified with a startAtOperationTime, we need to remove it // to use the new resume token. - changeStreamStage[DocumentSourceChangeStreamSpec::kStartAtClusterTimeFieldName] = Value(); + changeStreamStage[DocumentSourceChangeStreamSpec::kStartAtOperationTimeFieldName] = Value(); pipeline[0] = Value(Document{{DocumentSourceChangeStream::kStageName, changeStreamStage.freeze()}}); MutableDocument newCmd(originalCmd); |