summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2010-02-16 20:50:55 -0800
committerAaron <aaron@10gen.com>2010-02-16 20:50:55 -0800
commit241ec02cae768a0da98ebf745269bf4cf9e80b67 (patch)
tree946758eea6b907bcb64fa1fce781c0b525a02a59 /shell
parent23475ac37fa350480eb0fe5e0c2800c15ad77995 (diff)
downloadmongo-241ec02cae768a0da98ebf745269bf4cf9e80b67.tar.gz
SERVER-623 specify fastsync on both nodes to eliminate slow oplog scan by new pair master
Diffstat (limited to 'shell')
-rw-r--r--shell/utils.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/shell/utils.cpp b/shell/utils.cpp
index f15cb4b077d..be24a5e1103 100644
--- a/shell/utils.cpp
+++ b/shell/utils.cpp
@@ -218,7 +218,13 @@ namespace mongo {
out = out.substr( len - 100000, 100000 );
return BSON( "" << out );
}
-
+
+ BSONObj ClearRawMongoProgramOutput( const BSONObj &args ) {
+ boost::mutex::scoped_lock lk( mongoProgramOutputMutex );
+ mongoProgramOutput_.str( "" );
+ return undefined_;
+ }
+
class ProgramRunner {
vector<string> argv_;
int port_;
@@ -660,6 +666,7 @@ namespace mongo {
scope.injectNative( "stopMongoProgram", StopMongoProgram );
scope.injectNative( "stopMongoProgramByPid", StopMongoProgramByPid );
scope.injectNative( "rawMongoProgramOutput", RawMongoProgramOutput );
+ scope.injectNative( "clearRawMongoProgramOutput", ClearRawMongoProgramOutput );
//can't access filesystem
scope.injectNative( "removeFile" , removeFile );