summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2014-05-13 15:00:52 -0400
committerMathias Stearn <mathias@10gen.com>2014-05-27 18:58:15 -0400
commit00b9a481e421ee720a6b4274012dc14e244aa5e2 (patch)
tree78748643a538fec1cf3b970cc41ac3ef77789f0b /src/mongo/db/clientcursor.h
parente4deee1ac2e4ad5bf485dfaa1c8745c3f0d1c724 (diff)
downloadmongo-00b9a481e421ee720a6b4274012dc14e244aa5e2.tar.gz
SERVER-4740 Don't use unsigned for time deltas
Leads to weird bugs when time goes backwards. This commit doesn't resolve SERVER-4740 (Use monotonic clock sources for Timer) but lessens the impact of using a non-monotonic clock.
Diffstat (limited to 'src/mongo/db/clientcursor.h')
-rw-r--r--src/mongo/db/clientcursor.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/clientcursor.h b/src/mongo/db/clientcursor.h
index ca8aa95ca23..ae6640fa39f 100644
--- a/src/mongo/db/clientcursor.h
+++ b/src/mongo/db/clientcursor.h
@@ -89,9 +89,9 @@ namespace mongo {
* @param millis amount of idle passed time since last call
* note called outside of locks (other than ccmutex) so care must be exercised
*/
- bool shouldTimeout( unsigned millis );
- void setIdleTime( unsigned millis );
- unsigned idleTime() const { return _idleAgeMillis; }
+ bool shouldTimeout( int millis );
+ void setIdleTime( int millis );
+ int idleTime() const { return _idleAgeMillis; }
uint64_t getLeftoverMaxTimeMicros() const { return _leftoverMaxTimeMicros; }
void setLeftoverMaxTimeMicros( uint64_t leftoverMaxTimeMicros ) {
@@ -184,7 +184,7 @@ namespace mongo {
OpTime _slaveReadTill;
// How long has the cursor been idle?
- unsigned _idleAgeMillis;
+ int _idleAgeMillis;
// TODO: Document.
uint64_t _leftoverMaxTimeMicros;