summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2022-04-12 12:39:44 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-12 19:50:39 +0000
commit13845ec84c5ccfbabde4280f778d95637b8495f4 (patch)
tree6858fcb175b4f18dd80948912b0a600409c3307a
parent1d49f6dda41d97558ef28ba348de08bf30e2f7c1 (diff)
downloadmongo-13845ec84c5ccfbabde4280f778d95637b8495f4.tar.gz
SERVER-65474 Remove comments about ObjectId in WiredTigerRecordStorer6.0.0-alpha1
-rw-r--r--src/mongo/db/storage/record_store_test_harness.cpp4
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp8
2 files changed, 4 insertions, 8 deletions
diff --git a/src/mongo/db/storage/record_store_test_harness.cpp b/src/mongo/db/storage/record_store_test_harness.cpp
index eec2f336fc7..00f937ac8be 100644
--- a/src/mongo/db/storage/record_store_test_harness.cpp
+++ b/src/mongo/db/storage/record_store_test_harness.cpp
@@ -451,7 +451,6 @@ TEST(RecordStoreTestHarness, ClusteredRecordStore) {
}
if (auto cursor = rs->getRandomCursor(opCtx.get())) {
- // Verify random cursors work on ObjectId's.
auto record = cursor->next();
ASSERT(record);
@@ -468,7 +467,6 @@ TEST(RecordStoreTestHarness, ClusteredRecordStore) {
}
{
- // Verify that find works with ObjectId.
for (int i = 0; i < numRecords; i += 10) {
RecordData rd;
ASSERT_TRUE(rs->findRecord(opCtx.get(), records.at(i).id, &rd));
@@ -484,7 +482,6 @@ TEST(RecordStoreTestHarness, ClusteredRecordStore) {
}
{
- // Verify that update works with ObjectId.
BSONObj doc = BSON("i"
<< "updated");
@@ -503,7 +500,6 @@ TEST(RecordStoreTestHarness, ClusteredRecordStore) {
}
{
- // Verify that delete works with ObjectId.
WriteUnitOfWork wuow(opCtx.get());
for (int i = 0; i < numRecords; i += 10) {
rs->deleteRecord(opCtx.get(), records.at(i).id);
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
index a715ca4b2c0..ace8dd90cf8 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
@@ -1899,8 +1899,8 @@ void WiredTigerRecordStore::updateStatsAfterRepair(OperationContext* opCtx,
}
void WiredTigerRecordStore::_initNextIdIfNeeded(OperationContext* opCtx) {
- // Clustered record stores do not generate unique ObjectId's for RecordId's as the expectation
- // is for the caller to set the RecordId using the server generated ObjectId.
+ // Clustered record stores do not automatically generate int64 RecordIds. RecordIds are instead
+ // constructed as binary strings, KeyFormat::String, from the user-defined cluster key.
invariant(_keyFormat == KeyFormat::Long);
// In the normal case, this will already be initialized, so use a weak load. Since this value
@@ -1964,8 +1964,8 @@ void WiredTigerRecordStore::_initNextIdIfNeeded(OperationContext* opCtx) {
}
RecordId WiredTigerRecordStore::_nextId(OperationContext* opCtx) {
- // Clustered record stores do not generate unique ObjectId's for RecordId's as the expectation
- // is for the caller to set the RecordId using the server generated ObjectId.
+ // Clustered record stores do not automatically generate int64 RecordIds. RecordIds are instead
+ // constructed as binary strings, KeyFormat::String, from the user-defined cluster key.
invariant(_keyFormat == KeyFormat::Long);
invariant(!_isOplog);
_initNextIdIfNeeded(opCtx);