summaryrefslogtreecommitdiff
path: root/src/mongo/db/index/index_access_method.h
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@10gen.com>2016-04-05 09:33:23 -0400
committerJames Wahlin <james.wahlin@10gen.com>2016-04-21 11:45:40 -0400
commit6bbaee174447ee1c9177c72bdd07f050ab07e901 (patch)
tree213a1b76b23f31c143fb8ac4f3299fb1e13fc8a9 /src/mongo/db/index/index_access_method.h
parent223c2a1aa5fd11fd3e7115ca9acb6d1217f80f92 (diff)
downloadmongo-6bbaee174447ee1c9177c72bdd07f050ab07e901.tar.gz
SERVER-23271 Add keysInserted and keysDeleted metrics for CRUD ops
Diffstat (limited to 'src/mongo/db/index/index_access_method.h')
-rw-r--r--src/mongo/db/index/index_access_method.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mongo/db/index/index_access_method.h b/src/mongo/db/index/index_access_method.h
index f0376af716a..1509500d916 100644
--- a/src/mongo/db/index/index_access_method.h
+++ b/src/mongo/db/index/index_access_method.h
@@ -71,7 +71,7 @@ public:
/**
* Internally generate the keys {k1, ..., kn} for 'obj'. For each key k, insert (k ->
- * 'loc') into the index. 'obj' is the object at the location 'loc'. If not NULL,
+ * 'loc') into the index. 'obj' is the object at the location 'loc'.
* '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.
*
@@ -84,8 +84,8 @@ public:
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.
+ * Analogous to above, but remove the records instead of inserting them.
+ * 'numDeleted' will be set to the number of keys removed from the index for the document.
*/
Status remove(OperationContext* txn,
const BSONObj& obj,
@@ -118,8 +118,14 @@ public:
* 'from' will remain. Assumes that the index has not changed since validateUpdate was
* called. If the index was changed, we may return an error, as our ticket may have been
* invalidated.
+ *
+ * 'numInserted' will be set to the number of keys inserted into the index for the document.
+ * 'numDeleted' will be set to the number of keys removed from the index for the document.
*/
- Status update(OperationContext* txn, const UpdateTicket& ticket, int64_t* numUpdated);
+ Status update(OperationContext* txn,
+ const UpdateTicket& ticket,
+ int64_t* numInserted,
+ int64_t* numDeleted);
/**
* Returns an unpositioned cursor over 'this' index.