diff options
-rw-r--r-- | src/mongo/db/storage/record_store_test_harness.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp | 8 |
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); |