diff options
author | Louis Williams <louis.williams@mongodb.com> | 2021-02-08 12:57:37 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-02-10 17:03:27 +0000 |
commit | e09ce369e4912a945454a5494248046535c70460 (patch) | |
tree | dd445b60779ce625085343de71eaa114afc966bc /src/mongo/dbtests | |
parent | 861023b28a5dc270d2c459194dab8ea72b3bb817 (diff) | |
download | mongo-e09ce369e4912a945454a5494248046535c70460.tar.gz |
SERVER-53989 Generalize RecordId to store small binary strings
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r-- | src/mongo/dbtests/validate_tests.cpp | 14 | ||||
-rw-r--r-- | src/mongo/dbtests/wildcard_multikey_persistence_test.cpp | 3 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/mongo/dbtests/validate_tests.cpp b/src/mongo/dbtests/validate_tests.cpp index 5e71b9c72a0..8ee3a96f51f 100644 --- a/src/mongo/dbtests/validate_tests.cpp +++ b/src/mongo/dbtests/validate_tests.cpp @@ -1184,7 +1184,7 @@ public: // Insert documents. OpDebug* const nullOpDebug = nullptr; - RecordId rid = RecordId::min<int64_t>(); + RecordId rid = RecordId::minLong(); lockDb(MODE_X); { WriteUnitOfWork wunit(&_opCtx); @@ -1280,7 +1280,7 @@ public: // Insert documents. OpDebug* const nullOpDebug = nullptr; - RecordId rid = RecordId::min<int64_t>(); + RecordId rid = RecordId::minLong(); lockDb(MODE_X); { WriteUnitOfWork wunit(&_opCtx); @@ -1397,7 +1397,7 @@ public: // Insert documents. OpDebug* const nullOpDebug = nullptr; - RecordId rid = RecordId::min<int64_t>(); + RecordId rid = RecordId::minLong(); lockDb(MODE_X); { WriteUnitOfWork wunit(&_opCtx); @@ -1665,7 +1665,7 @@ public: // Insert documents. OpDebug* const nullOpDebug = nullptr; - RecordId rid = RecordId::min<int64_t>(); + RecordId rid = RecordId::minLong(); lockDb(MODE_X); { WriteUnitOfWork wunit(&_opCtx); @@ -1843,7 +1843,7 @@ public: // Insert documents. OpDebug* const nullOpDebug = nullptr; - RecordId rid = RecordId::min<int64_t>(); + RecordId rid = RecordId::minLong(); lockDb(MODE_X); { WriteUnitOfWork wunit(&_opCtx); @@ -2407,7 +2407,7 @@ public: // Insert a document. OpDebug* const nullOpDebug = nullptr; - RecordId rid = RecordId::min<int64_t>(); + RecordId rid = RecordId::minLong(); lockDb(MODE_X); { WriteUnitOfWork wunit(&_opCtx); @@ -3533,7 +3533,7 @@ public: BSONObj obj(buffer); RecordStore* rs = coll->getRecordStore(); - RecordId rid(OID::gen()); + RecordId rid(OID::gen().view().view(), OID::kOIDSize); { WriteUnitOfWork wunit(&_opCtx); ASSERT_OK(rs->insertRecord(&_opCtx, rid, obj.objdata(), obj.objsize(), Timestamp())); diff --git a/src/mongo/dbtests/wildcard_multikey_persistence_test.cpp b/src/mongo/dbtests/wildcard_multikey_persistence_test.cpp index cb478c627c2..7ad3bf7a10d 100644 --- a/src/mongo/dbtests/wildcard_multikey_persistence_test.cpp +++ b/src/mongo/dbtests/wildcard_multikey_persistence_test.cpp @@ -45,7 +45,8 @@ namespace { using namespace unittest; -static const RecordId kMetadataId = RecordId::minReserved<int64_t>(); +static const RecordId kMetadataId = + RecordId::reservedIdFor<int64_t>(RecordId::Reservation::kWildcardMultikeyMetadataId); static const int kIndexVersion = static_cast<int>(IndexDescriptor::kLatestIndexVersion); static const NamespaceString kDefaultNSS{"wildcard_multikey_persistence.test"}; |