From b4cb96852037aecfab27aa7b72a2ee586a3aa2e3 Mon Sep 17 00:00:00 2001 From: Louis Williams Date: Fri, 7 Dec 2018 13:40:17 -0500 Subject: SERVER-38453 SortedDataInterface should expose a method to determine whether or not a key is a duplicate SERVER-38036 Turn on hybrid builds for background, unique indexes --- src/mongo/db/storage/sorted_data_interface.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/mongo/db/storage/sorted_data_interface.h') diff --git a/src/mongo/db/storage/sorted_data_interface.h b/src/mongo/db/storage/sorted_data_interface.h index 0164388df16..12c601f37f3 100644 --- a/src/mongo/db/storage/sorted_data_interface.h +++ b/src/mongo/db/storage/sorted_data_interface.h @@ -114,16 +114,13 @@ public: bool dupsAllowed) = 0; /** - * Return ErrorCodes::DuplicateKey if 'key' already exists in 'this' - * index at a RecordId other than 'loc', and Status::OK() otherwise. + * Return ErrorCodes::DuplicateKey if there is more than one occurence of 'key' in this index, + * and Status::OK() otherwise. This call is only allowed on a unique index, and will invariant + * otherwise. * * @param opCtx the transaction under which this operation takes place - * - * TODO: Hide this by exposing an update method? */ - virtual Status dupKeyCheck(OperationContext* opCtx, - const BSONObj& key, - const RecordId& loc) = 0; + virtual Status dupKeyCheck(OperationContext* opCtx, const BSONObj& key) = 0; /** * Attempt to reduce the storage space used by this index via compaction. Only called if the -- cgit v1.2.1