diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-06-15 17:29:18 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-06-15 17:29:18 -0400 |
commit | 037cf2ea57f27e11a28cf54f3b6bf98944230f93 (patch) | |
tree | e6244a958089b665e5b4e85df8c69d5d196c2828 /db/clientcursor.h | |
parent | 5a5a18228173a9bb8b345f5695e8126e6d288312 (diff) | |
download | mongo-037cf2ea57f27e11a28cf54f3b6bf98944230f93.tar.gz |
yield with disk prep for ClientCursor SERVER-2563
Diffstat (limited to 'db/clientcursor.h')
-rw-r--r-- | db/clientcursor.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/db/clientcursor.h b/db/clientcursor.h index c1c6282bc8a..82e8b41bd57 100644 --- a/db/clientcursor.h +++ b/db/clientcursor.h @@ -167,6 +167,7 @@ namespace mongo { /** * @param microsToSleep -1 : ask client * >=0 : sleep for that amount + * @param recordToLoad after yielding lock, load this record with only mmutex * do a dbtemprelease * note: caller should check matcher.docMatcher().atomic() first and not yield if atomic - * we don't do herein as this->matcher (above) is only initialized for true queries/getmore. @@ -175,7 +176,7 @@ namespace mongo { * if false is returned, then this ClientCursor should be considered deleted - * in fact, the whole database could be gone. */ - bool yield( int microsToSleep = -1 ); + bool yield( int microsToSleep = -1 , Record * recordToLoad = 0 ); /** * @return same as yield() @@ -183,7 +184,7 @@ namespace mongo { bool yieldSometimes(); static int yieldSuggest(); - static void staticYield( int micros , const StringData& ns ); + static void staticYield( int micros , const StringData& ns , Record * rec ); struct YieldData { CursorId _id; bool _doingDeletes; }; bool prepareToYield( YieldData &data ); |