diff options
author | James Wahlin <james.wahlin@10gen.com> | 2016-04-21 15:55:32 -0400 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2016-04-21 16:48:06 -0400 |
commit | dc3d30af10b6859124d1ce8790ad8e097d1f06c7 (patch) | |
tree | 4cf90aec523a535c5974007a08fcc95e0f8528bb /src/mongo/db/storage/ephemeral_for_test | |
parent | 1a371955e7a93f846a5ddddb19f33d6b270a3991 (diff) | |
download | mongo-dc3d30af10b6859124d1ce8790ad8e097d1f06c7.tar.gz |
SERVER-23271 Add keysInserted and keysDeleted metrics for CRUD ops
Diffstat (limited to 'src/mongo/db/storage/ephemeral_for_test')
-rw-r--r-- | src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp | 16 | ||||
-rw-r--r-- | src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.h | 12 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp index 6f1c48663dd..7fa168612b0 100644 --- a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp +++ b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp @@ -430,12 +430,12 @@ StatusWith<RecordId> EphemeralForTestRecordStore::insertRecord(OperationContext* return StatusWith<RecordId>(loc); } -StatusWith<RecordId> EphemeralForTestRecordStore::updateRecord(OperationContext* txn, - const RecordId& loc, - const char* data, - int len, - bool enforceQuota, - UpdateNotifier* notifier) { +Status EphemeralForTestRecordStore::updateRecord(OperationContext* txn, + const RecordId& loc, + const char* data, + int len, + bool enforceQuota, + UpdateNotifier* notifier) { EphemeralForTestRecord* oldRecord = recordFor(loc); int oldLen = oldRecord->size; @@ -447,7 +447,7 @@ StatusWith<RecordId> EphemeralForTestRecordStore::updateRecord(OperationContext* // doc-locking), and therefore must notify that it is updating a document. Status callbackStatus = notifier->recordStoreGoingToUpdateInPlace(txn, loc); if (!callbackStatus.isOK()) { - return StatusWith<RecordId>(callbackStatus); + return callbackStatus; } } @@ -460,7 +460,7 @@ StatusWith<RecordId> EphemeralForTestRecordStore::updateRecord(OperationContext* cappedDeleteAsNeeded(txn); - return StatusWith<RecordId>(loc); + return Status::OK(); } bool EphemeralForTestRecordStore::updateWithDamagesSupported() const { diff --git a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.h b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.h index 324a30653eb..8f83cfe9dfd 100644 --- a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.h +++ b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.h @@ -69,12 +69,12 @@ public: const DocWriter* doc, bool enforceQuota); - virtual StatusWith<RecordId> updateRecord(OperationContext* txn, - const RecordId& oldLocation, - const char* data, - int len, - bool enforceQuota, - UpdateNotifier* notifier); + virtual Status updateRecord(OperationContext* txn, + const RecordId& oldLocation, + const char* data, + int len, + bool enforceQuota, + UpdateNotifier* notifier); virtual bool updateWithDamagesSupported() const; |