summaryrefslogtreecommitdiff
path: root/db/clientcursor.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-08-18 09:48:02 -0400
committerEliot Horowitz <eliot@10gen.com>2010-08-18 09:48:02 -0400
commit70f3d4fc31ab7bf2e834f66522fe3e1ce9728270 (patch)
tree1aff0eab962edeea27749ded7f0ab76a4c851596 /db/clientcursor.h
parenta054706d1ec4e351d8f3c7e993e2e0f3a3f683b3 (diff)
downloadmongo-70f3d4fc31ab7bf2e834f66522fe3e1ce9728270.tar.gz
track number of timed out cursors and display in cursorinfo and serverStatus
Diffstat (limited to 'db/clientcursor.h')
-rw-r--r--db/clientcursor.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/db/clientcursor.h b/db/clientcursor.h
index 32453fdc17f..0bb67729d6a 100644
--- a/db/clientcursor.h
+++ b/db/clientcursor.h
@@ -65,10 +65,11 @@ namespace mongo {
static CCById clientCursorsById;
static CCByLoc byLoc;
+ static long long numberTimedOut;
static boost::recursive_mutex ccmutex; // must use this for all statics above!
static CursorId allocCursorId_inlock();
-
+
public:
@@ -308,10 +309,7 @@ namespace mongo {
/**
* @param millis amount of idle passed time since last call
*/
- bool shouldTimeout( unsigned millis ){
- _idleAgeMillis += millis;
- return _idleAgeMillis > 600000 && _pinValue == 0;
- }
+ bool shouldTimeout( unsigned millis );
void storeOpForSlave( DiskLoc last );
void updateSlaveLocation( CurOp& curop );
@@ -331,6 +329,8 @@ public:
void setDoingDeletes( bool doingDeletes ){
_doingDeletes = doingDeletes;
}
+
+ static void appendStats( BSONObjBuilder& result );
static unsigned byLocSize(); // just for diagnostics