summaryrefslogtreecommitdiff
path: root/src/mongo/db/query
diff options
context:
space:
mode:
authorAli Mir <ali.mir@mongodb.com>2020-06-03 14:49:45 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-18 16:34:11 +0000
commitabd8f45403473fcb35204d10ba0f5a260d4105ef (patch)
treedc10106ff02fedbe412b975f2a48a2befca0097b /src/mongo/db/query
parentafb48b7c57718194bd7da1f93b5c4646cac819a0 (diff)
downloadmongo-abd8f45403473fcb35204d10ba0f5a260d4105ef.tar.gz
SERVER-47783 Use atClusterTime instead of $_internalReadAtClusterTime in tests
Diffstat (limited to 'src/mongo/db/query')
-rw-r--r--src/mongo/db/query/query_request.cpp16
-rw-r--r--src/mongo/db/query/query_request.h9
2 files changed, 0 insertions, 25 deletions
diff --git a/src/mongo/db/query/query_request.cpp b/src/mongo/db/query/query_request.cpp
index df70966c9aa..4c72902b62d 100644
--- a/src/mongo/db/query/query_request.cpp
+++ b/src/mongo/db/query/query_request.cpp
@@ -344,12 +344,6 @@ StatusWith<std::unique_ptr<QueryRequest>> QueryRequest::parseFromFindCommand(
return status;
}
qr->_allowSpeculativeMajorityRead = el.boolean();
- } else if (fieldName == kInternalReadAtClusterTimeField) {
- Status status = checkFieldType(el, BSONType::bsonTimestamp);
- if (!status.isOK()) {
- return status;
- }
- qr->_internalReadAtClusterTime = el.timestamp();
} else if (fieldName == kResumeAfterField) {
Status status = checkFieldType(el, Object);
if (!status.isOK()) {
@@ -550,10 +544,6 @@ void QueryRequest::asFindCommandInternal(BSONObjBuilder* cmdBuilder) const {
cmdBuilder->append(kAllowSpeculativeMajorityReadField, true);
}
- if (_internalReadAtClusterTime) {
- cmdBuilder->append(kInternalReadAtClusterTimeField, *_internalReadAtClusterTime);
- }
-
if (_requestResumeToken) {
cmdBuilder->append(kRequestResumeTokenField, _requestResumeToken);
}
@@ -1004,12 +994,6 @@ StatusWith<BSONObj> QueryRequest::asAggregationCommand() const {
<< " not supported in aggregation."};
}
- if (_internalReadAtClusterTime) {
- return {ErrorCodes::InvalidPipelineOperator,
- str::stream() << "Option " << kInternalReadAtClusterTimeField
- << " not supported in aggregation."};
- }
-
if (_requestResumeToken) {
return {ErrorCodes::InvalidPipelineOperator,
str::stream() << "Option " << kRequestResumeTokenField
diff --git a/src/mongo/db/query/query_request.h b/src/mongo/db/query/query_request.h
index 3b071f99566..bfb9615dbcd 100644
--- a/src/mongo/db/query/query_request.h
+++ b/src/mongo/db/query/query_request.h
@@ -78,7 +78,6 @@ public:
static constexpr auto kOptionsField = "options";
static constexpr auto kReadOnceField = "readOnce";
static constexpr auto kAllowSpeculativeMajorityReadField = "allowSpeculativeMajorityRead";
- static constexpr auto kInternalReadAtClusterTimeField = "$_internalReadAtClusterTime";
static constexpr auto kRequestResumeTokenField = "$_requestResumeToken";
static constexpr auto kResumeAfterField = "$_resumeAfter";
static constexpr auto kUse44SortKeys = "_use44SortKeys";
@@ -434,10 +433,6 @@ public:
return _allowSpeculativeMajorityRead;
}
- boost::optional<Timestamp> getReadAtClusterTime() const {
- return _internalReadAtClusterTime;
- }
-
bool getRequestResumeToken() const {
return _requestResumeToken;
}
@@ -590,10 +585,6 @@ private:
bool _allowSpeculativeMajorityRead = false;
boost::optional<long long> _replicationTerm;
-
- // The Timestamp that RecoveryUnit::setTimestampReadSource() should be called with. The optional
- // should only ever be engaged when testing commands are enabled.
- boost::optional<Timestamp> _internalReadAtClusterTime;
};
} // namespace mongo