diff options
author | Geert Bosch <geert@mongodb.com> | 2016-04-07 14:22:08 -0400 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2016-04-07 15:09:18 -0400 |
commit | 36e6aaa4ae1a5e0ffa80b5586fd52dee597e1aca (patch) | |
tree | 058fe29e00dbbd743680a1333f07c65c62aacbb9 /src/mongo/db/index/index_access_method.h | |
parent | 4cf2b5e3fbd85c40ea98e2b562376426e8da4dd8 (diff) | |
download | mongo-36e6aaa4ae1a5e0ffa80b5586fd52dee597e1aca.tar.gz |
SERVER-22723 Remove unused noWarn flag and logIfError option
Diffstat (limited to 'src/mongo/db/index/index_access_method.h')
-rw-r--r-- | src/mongo/db/index/index_access_method.h | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/src/mongo/db/index/index_access_method.h b/src/mongo/db/index/index_access_method.h index f0376af716a..3aafc1f07d2 100644 --- a/src/mongo/db/index/index_access_method.h +++ b/src/mongo/db/index/index_access_method.h @@ -46,7 +46,6 @@ extern std::atomic<bool> failIndexKeyTooLong; // NOLINT class BSONObjBuilder; class MatchExpression; class UpdateTicket; -struct InsertDeleteOptions; /** * An IndexAccessMethod is the interface through which all the mutation, lookup, and @@ -74,23 +73,22 @@ public: * 'loc') into the index. 'obj' is the object at the location 'loc'. If not NULL, * 'numInserted' will be set to the number of keys added to the index for the document. If * there is more than one key for 'obj', either all keys will be inserted or none will. - * - * The behavior of the insertion can be specified through 'options'. */ Status insert(OperationContext* txn, const BSONObj& obj, const RecordId& loc, - const InsertDeleteOptions& options, + bool dupsAllowed, int64_t* numInserted); /** * Analogous to above, but remove the records instead of inserting them. If not NULL, * numDeleted will be set to the number of keys removed from the index for the document. + * If dupsAllowed is false, the record can be unindexed without checking its loc. */ Status remove(OperationContext* txn, const BSONObj& obj, const RecordId& loc, - const InsertDeleteOptions& options, + bool dupsAllowed, int64_t* numDeleted); /** @@ -107,7 +105,7 @@ public: const BSONObj& from, const BSONObj& to, const RecordId& loc, - const InsertDeleteOptions& options, + bool dupsAllowed, UpdateTicket* ticket, const MatchExpression* indexFilter); @@ -203,11 +201,7 @@ public: /** * Insert into the BulkBuilder as-if inserting into an IndexAccessMethod. */ - Status insert(OperationContext* txn, - const BSONObj& obj, - const RecordId& loc, - const InsertDeleteOptions& options, - int64_t* numInserted); + Status insert(OperationContext* txn, const BSONObj& obj, const RecordId& loc); private: friend class IndexAccessMethod; @@ -288,18 +282,4 @@ private: RecordId loc; bool dupsAllowed; }; - -/** - * Flags we can set for inserts and deletes (and updates, which are kind of both). - */ -struct InsertDeleteOptions { - InsertDeleteOptions() : logIfError(false), dupsAllowed(false) {} - - // If there's an error, log() it. - bool logIfError; - - // Are duplicate keys allowed in the index? - bool dupsAllowed; -}; - } // namespace mongo |