From 1463c58b700738a17ff8501c8b5bc6b6fea8f3ea Mon Sep 17 00:00:00 2001 From: Louis Williams Date: Tue, 20 Aug 2019 15:20:55 +0000 Subject: SERVER-42247 Callers of SortedDataInterface insert and unindex should pass KeyStrings --- src/mongo/db/storage/mobile/mobile_index.cpp | 25 +------------------------ src/mongo/db/storage/mobile/mobile_index.h | 10 ---------- 2 files changed, 1 insertion(+), 34 deletions(-) (limited to 'src/mongo/db/storage/mobile') diff --git a/src/mongo/db/storage/mobile/mobile_index.cpp b/src/mongo/db/storage/mobile/mobile_index.cpp index f66050f6b72..c542bf70b0b 100644 --- a/src/mongo/db/storage/mobile/mobile_index.cpp +++ b/src/mongo/db/storage/mobile/mobile_index.cpp @@ -59,18 +59,6 @@ MobileIndex::MobileIndex(OperationContext* opCtx, _indexName(desc->indexName()), _keyPattern(desc->keyPattern()) {} -Status MobileIndex::insert(OperationContext* opCtx, - const BSONObj& key, - const RecordId& recId, - bool dupsAllowed) { - invariant(recId.isValid()); - invariant(!key.hasFieldNames()); - - KeyString::HeapBuilder keyString(_keyStringVersion, key, _ordering, recId); - - return insert(opCtx, std::move(keyString.release()), recId, dupsAllowed); -} - Status MobileIndex::insert(OperationContext* opCtx, const KeyString::Value& keyString, const RecordId& recId, @@ -117,22 +105,11 @@ Status MobileIndex::doInsert(OperationContext* opCtx, return Status::OK(); } -void MobileIndex::unindex(OperationContext* opCtx, - const BSONObj& key, - const RecordId& recId, - bool dupsAllowed) { - invariant(recId.isValid()); - invariant(!key.hasFieldNames()); - - KeyString::HeapBuilder keyString(_keyStringVersion, key, _ordering, recId); - - unindex(opCtx, std::move(keyString.release()), recId, dupsAllowed); -} - void MobileIndex::unindex(OperationContext* opCtx, const KeyString::Value& keyString, const RecordId& recId, bool dupsAllowed) { + invariant(recId.isValid()); _unindex(opCtx, keyString, recId, dupsAllowed); } diff --git a/src/mongo/db/storage/mobile/mobile_index.h b/src/mongo/db/storage/mobile/mobile_index.h index 2ab95649743..76d48fa47fb 100644 --- a/src/mongo/db/storage/mobile/mobile_index.h +++ b/src/mongo/db/storage/mobile/mobile_index.h @@ -52,21 +52,11 @@ public: virtual ~MobileIndex() {} - Status insert(OperationContext* opCtx, - const BSONObj& key, - const RecordId& recId, - bool dupsAllowed) override; - Status insert(OperationContext* opCtx, const KeyString::Value& keyString, const RecordId& recId, bool dupsAllowed) override; - void unindex(OperationContext* opCtx, - const BSONObj& key, - const RecordId& recId, - bool dupsAllowed) override; - void unindex(OperationContext* opCtx, const KeyString::Value& keyString, const RecordId& recId, -- cgit v1.2.1