diff options
author | Irina Yatsenko <irina.yatsenko@mongodb.com> | 2021-08-16 15:35:51 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-23 19:44:53 +0000 |
commit | df329d8f46e1485dd5d70379f9c48bf4175f0d5a (patch) | |
tree | 80adf0442b021bdd689d59697a6b85ebf4dab24d /src/mongo/db/repl/rollback_impl.cpp | |
parent | 5cf8a293567989fcc970fb21cde4a1af111c8b58 (diff) | |
download | mongo-df329d8f46e1485dd5d70379f9c48bf4175f0d5a.tar.gz |
SERVER-58670 Tighten up what kind of BSON the 'Query' type can be wrapped around
This refactor includes:
Remove dead code from 'Query' type and reduce it public interface.
Split query argument in query/update/removed methods into filter BSON and settings (which are still passed around as 'Query' type).
Remove Query(string) constructors.
Remove most callers of 'Query(const BSONObj&)'.
Replace public 'Query(const BSON&)' and 'Query.obj' with an explicit factory method and a getter.
Diffstat (limited to 'src/mongo/db/repl/rollback_impl.cpp')
-rw-r--r-- | src/mongo/db/repl/rollback_impl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/repl/rollback_impl.cpp b/src/mongo/db/repl/rollback_impl.cpp index 639a20df546..ebeda465968 100644 --- a/src/mongo/db/repl/rollback_impl.cpp +++ b/src/mongo/db/repl/rollback_impl.cpp @@ -477,10 +477,10 @@ void RollbackImpl::_restoreTxnsTableEntryFromRetryableWrites(OperationContext* o << "fromMigrate" << true); auto cursor = client->query( NamespaceString::kRsOplogNamespace, - QUERY("ts" << BSON("$gt" << stableTimestamp) << "txnNumber" << BSON("$exists" << true) - << "stmtId" << BSON("$exists" << true) << "prevOpTime.ts" - << BSON("$gte" << Timestamp(1, 0) << "$lte" << stableTimestamp) << "$or" - << BSON_ARRAY(filter << filterFromMigration))); + BSON("ts" << BSON("$gt" << stableTimestamp) << "txnNumber" << BSON("$exists" << true) + << "stmtId" << BSON("$exists" << true) << "prevOpTime.ts" + << BSON("$gte" << Timestamp(1, 0) << "$lte" << stableTimestamp) << "$or" + << BSON_ARRAY(filter << filterFromMigration))); while (cursor->more()) { auto doc = cursor->next(); auto swEntry = OplogEntry::parse(doc); |