summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2016-05-02 10:55:01 -0400
committerAndy Schwerin <schwerin@mongodb.com>2016-05-23 10:28:31 -0400
commit2e627487ef0475c46143b5f57d3e7c3d3027d5dc (patch)
tree7ad552be9a3cae113bc3cfd9df0faea78aa50e24 /src/mongo/db/clientcursor.cpp
parentc9aac9d6eaba6ef2eb8903f07e997b594e88addc (diff)
downloadmongo-2e627487ef0475c46143b5f57d3e7c3d3027d5dc.tar.gz
SERVER-18277 Track elapsed time on cursors using microsecond resolution on OperationContext.
This completes the mechanics of moving max-time tracking to OperationContext and switching the checkForInterrupt checks to use the service context's fast clock source, while tracking the amount of execution time remaining on a cursor with microsecond granularity to ensure that remaining execution time always declines, even for very brief operations on cursors. This patch does not complete the transition from wait_for waiting to wait_until waiting in all places that do waiting based on operation deadlines.
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r--src/mongo/db/clientcursor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp
index 52081f2976b..db22953e211 100644
--- a/src/mongo/db/clientcursor.cpp
+++ b/src/mongo/db/clientcursor.cpp
@@ -114,7 +114,7 @@ void ClientCursor::init() {
_isNoTimeout = false;
_idleAgeMillis = 0;
- _leftoverMaxTimeMicros = 0;
+ _leftoverMaxTimeMicros = Microseconds::max();
_pos = 0;
if (_queryOptions & QueryOption_NoCursorTimeout) {