diff options
author | Louis Williams <louis.williams@mongodb.com> | 2019-08-20 15:20:55 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-08-20 15:20:55 +0000 |
commit | 1463c58b700738a17ff8501c8b5bc6b6fea8f3ea (patch) | |
tree | a248a1b1289dc1c18c32f9765fb612694da5fe24 /src/mongo/db/storage/mobile | |
parent | cdde2f26f6850149ff34c5267228297c6ed46c31 (diff) | |
download | mongo-1463c58b700738a17ff8501c8b5bc6b6fea8f3ea.tar.gz |
SERVER-42247 Callers of SortedDataInterface insert and unindex should pass KeyStrings
Diffstat (limited to 'src/mongo/db/storage/mobile')
-rw-r--r-- | src/mongo/db/storage/mobile/mobile_index.cpp | 25 | ||||
-rw-r--r-- | src/mongo/db/storage/mobile/mobile_index.h | 10 |
2 files changed, 1 insertions, 34 deletions
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 @@ -60,18 +60,6 @@ MobileIndex::MobileIndex(OperationContext* opCtx, _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, bool dupsAllowed) { @@ -118,21 +106,10 @@ Status MobileIndex::doInsert(OperationContext* opCtx, } 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 @@ -53,21 +53,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, bool dupsAllowed) override; |