diff options
author | Louis Williams <louis.williams@mongodb.com> | 2018-12-07 13:40:17 -0500 |
---|---|---|
committer | Louis Williams <louis.williams@mongodb.com> | 2018-12-13 11:41:02 -0500 |
commit | b4cb96852037aecfab27aa7b72a2ee586a3aa2e3 (patch) | |
tree | 8cdf4b47255d577a291b8714f9ae54b89942ec26 /src/mongo/db/storage/sorted_data_interface.h | |
parent | 6d900523fac41857c7fe05a34dd480d1f4b56ec8 (diff) | |
download | mongo-b4cb96852037aecfab27aa7b72a2ee586a3aa2e3.tar.gz |
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
Diffstat (limited to 'src/mongo/db/storage/sorted_data_interface.h')
-rw-r--r-- | src/mongo/db/storage/sorted_data_interface.h | 11 |
1 files changed, 4 insertions, 7 deletions
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 |