diff options
author | Jason Rassi <rassi@10gen.com> | 2014-06-26 13:30:54 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2014-06-26 16:13:29 -0400 |
commit | 6937b273a7a9db13279161ba3e74259eb89b0d15 (patch) | |
tree | ce2f85cb556197efe9e4ccd0780a4647a047a9d6 /src/mongo | |
parent | 6dea111420582f580ff8caab2e783b228f4e0f61 (diff) | |
download | mongo-6937b273a7a9db13279161ba3e74259eb89b0d15.tar.gz |
SERVER-14341 OpCounters missing calls to _checkWrap() added back
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/stats/counters.cpp | 36 | ||||
-rw-r--r-- | src/mongo/db/stats/counters.h | 14 |
2 files changed, 42 insertions, 8 deletions
diff --git a/src/mongo/db/stats/counters.cpp b/src/mongo/db/stats/counters.cpp index 6f4d5438773..a50aca7eeba 100644 --- a/src/mongo/db/stats/counters.cpp +++ b/src/mongo/db/stats/counters.cpp @@ -37,8 +37,42 @@ namespace mongo { OpCounters::OpCounters() {} - void OpCounters::gotOp( int op , bool isCommand ) { + void OpCounters::incInsertInWriteLock(int n) { + RARELY _checkWrap(); + _insert.x += n; + } + + void OpCounters::gotInsert() { + RARELY _checkWrap(); + _insert++; + } + + void OpCounters::gotQuery() { + RARELY _checkWrap(); + _query++; + } + + void OpCounters::gotUpdate() { + RARELY _checkWrap(); + _update++; + } + + void OpCounters::gotDelete() { + RARELY _checkWrap(); + _delete++; + } + + void OpCounters::gotGetMore() { RARELY _checkWrap(); + _getmore++; + } + + void OpCounters::gotCommand() { + RARELY _checkWrap(); + _command++; + } + + void OpCounters::gotOp( int op , bool isCommand ) { switch ( op ) { case dbInsert: /*gotInsert();*/ break; // need to handle multi-insert case dbQuery: diff --git a/src/mongo/db/stats/counters.h b/src/mongo/db/stats/counters.h index 805df221036..b0aad7a7ce6 100644 --- a/src/mongo/db/stats/counters.h +++ b/src/mongo/db/stats/counters.h @@ -46,13 +46,13 @@ namespace mongo { public: OpCounters(); - void incInsertInWriteLock(int n) { _insert.x += n; } - void gotInsert() { _insert++; } - void gotQuery() { _query++; } - void gotUpdate() { _update++; } - void gotDelete() { _delete++; } - void gotGetMore() { _getmore++; } - void gotCommand() { _command++; } + void incInsertInWriteLock(int n); + void gotInsert(); + void gotQuery(); + void gotUpdate(); + void gotDelete(); + void gotGetMore(); + void gotCommand(); void gotOp( int op , bool isCommand ); |