summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordwight <dwight@10gen.com>2011-07-31 08:36:46 -0400
committerdwight <dwight@10gen.com>2011-07-31 08:36:46 -0400
commitfb8b8936656d94617e3c3b416c24e4660706610c (patch)
treeccde33e9ef56355a1564978f19e9bdc71e6f9b1e
parent3c55e8ccbaa9acff4cf9594771f67e935b18d9a4 (diff)
downloadmongo-fb8b8936656d94617e3c3b416c24e4660706610c.tar.gz
make journaling the default on 64 bit
-rw-r--r--SConstruct4
-rw-r--r--db/cmdline.cpp2
-rw-r--r--db/cmdline.h8
-rw-r--r--db/db.cpp3
-rw-r--r--shell/mongo_vstudio.cpp23
-rw-r--r--util/assert_util.cpp6
6 files changed, 38 insertions, 8 deletions
diff --git a/SConstruct b/SConstruct
index c47d3f6d280..2d8a4a973a7 100644
--- a/SConstruct
+++ b/SConstruct
@@ -144,6 +144,7 @@ add_option( "osnew", "use newer operating system API features" , 0 , False )
add_option( "d", "debug build no optimization, etc..." , 0 , True , "debugBuild" )
add_option( "dd", "debug build no optimization, additional debug logging, etc..." , 0 , False , "debugBuildAndLogging" )
add_option( "durableDefaultOn" , "have durable default to on" , 0 , True )
+add_option( "durableDefaultOff" , "have durable default to off" , 0 , True )
add_option( "pch" , "use precompiled headers to speed up the build (experimental)" , 0 , True , "usePCH" )
add_option( "distcc" , "use distcc for distributing builds" , 0 , False )
@@ -234,6 +235,9 @@ if has_option( "safeshell" ):
if has_option( "durableDefaultOn" ):
env.Append( CPPDEFINES=[ "_DURABLEDEFAULTON" ] )
+if has_option( "durableDefaultOff" ):
+ env.Append( CPPDEFINES=[ "_DURABLEDEFAULTOFF" ] )
+
boostCompiler = GetOption( "boostCompiler" )
if boostCompiler is None:
boostCompiler = ""
diff --git a/db/cmdline.cpp b/db/cmdline.cpp
index 01d238b1346..06880c98829 100644
--- a/db/cmdline.cpp
+++ b/db/cmdline.cpp
@@ -110,7 +110,7 @@ namespace mongo {
if ( s.find( "FASTSYNC" ) != string::npos )
cout << "warning \"fastsync\" should not be put in your configuration file" << endl;
- if ( s[0] == '#' ) {
+ if ( s.c_str()[0] == '#' ) {
// skipping commented line
} else if ( s.find( "=FALSE" ) == string::npos ) {
ss << line << endl;
diff --git a/db/cmdline.h b/db/cmdline.h
index 5394c4e3c72..77ba499b8ea 100644
--- a/db/cmdline.h
+++ b/db/cmdline.h
@@ -131,16 +131,20 @@ namespace mongo {
boost::program_options::variables_map &output );
};
+ // todo move to cmdline.cpp?
inline CmdLine::CmdLine() :
port(DefaultDBPort), rest(false), jsonp(false), quiet(false), noTableScan(false), prealloc(true), smallfiles(sizeof(int*) == 4),
configsvr(false),
quota(false), quotaFiles(8), cpu(false), durOptions(0), objcheck(false), oplogSize(0), defaultProfile(0), slowMS(100), pretouch(0), moveParanoia( true ),
syncdelay(60), noUnixSocket(false), socket("/tmp")
{
- // default may change for this later.
+ dur = false;
#if defined(_DURABLEDEFAULTON)
dur = true;
-#else
+#endif
+ if( sizeof(void*) == 8 )
+ dur = true;
+#if defined(_DURABLEDEFAULTOFF)
dur = false;
#endif
diff --git a/db/db.cpp b/db/db.cpp
index f9412208f71..1ea32b9c561 100644
--- a/db/db.cpp
+++ b/db/db.cpp
@@ -570,6 +570,7 @@ int main(int argc, char* argv[]) {
("jsonp","allow JSONP access via http (has security implications)")
("noauth", "run without security")
("nohttpinterface", "disable http interface")
+ ("nojournal", "disable journaling (journaling is on by default for 64 bit)")
("noprealloc", "disable data file preallocation - will often hurt performance")
("noscripting", "disable scripting engine")
("notablescan", "do not allow table scans")
@@ -622,9 +623,7 @@ int main(int argc, char* argv[]) {
("pretouch", po::value<int>(), "n pretouch threads for applying replicationed operations")
("command", po::value< vector<string> >(), "command")
("cacheSize", po::value<long>(), "cache size (in MB) for rec store")
- // these move to unhidden later:
("nodur", "disable journaling (currently the default)")
- ("nojournal", "disable journaling (currently the default)")
// things we don't want people to use
("nocursors", "diagnostic/debugging option that turns off cursors DO NOT USE IN PRODUCTION")
("nohints", "ignore query hints")
diff --git a/shell/mongo_vstudio.cpp b/shell/mongo_vstudio.cpp
index 5677297cb48..7f1b5030c22 100644
--- a/shell/mongo_vstudio.cpp
+++ b/shell/mongo_vstudio.cpp
@@ -955,6 +955,29 @@ const StringData _jscode_raw_utils =
"print( tojsononeline( x ) );\n"
"}\n"
"\n"
+"if ( typeof TestData == \"undefined\" ){\n"
+"TestData = undefined\n"
+"}\n"
+"\n"
+"jsTestName = function(){\n"
+"if( TestData ) return TestData.testName\n"
+"return \"__unknown_name__\"\n"
+"}\n"
+"\n"
+"jsTestFile = function(){\n"
+"if( TestData ) return TestData.testFile\n"
+"return \"__unknown_file__\"\n"
+"}\n"
+"\n"
+"jsTestPath = function(){\n"
+"if( TestData ) return TestData.testPath\n"
+"return \"__unknown_path__\"\n"
+"}\n"
+"\n"
+"testLog = function(x){\n"
+"print( jsTestFile() + \" - \" + x )\n"
+"}\n"
+"\n"
"shellPrintHelper = function (x) {\n"
"\n"
"if (typeof (x) == \"undefined\") {\n"
diff --git a/util/assert_util.cpp b/util/assert_util.cpp
index 52947bc02b8..712cc469467 100644
--- a/util/assert_util.cpp
+++ b/util/assert_util.cpp
@@ -70,7 +70,7 @@ namespace mongo {
sayDbContext();
raiseError(0,msg && *msg ? msg : "wassertion failure");
assertionCount.condrollover( ++assertionCount.warning );
-#if defined(_DEBUG) || defined(_DURABLEDEFAULTON)
+#if defined(_DEBUG) || defined(_DURABLEDEFAULTON) || defined(_DURABLEDEFAULTOFF)
// this is so we notice in buildbot
log() << "\n\n***aborting after wassert() failure in a debug/test build\n\n" << endl;
abort();
@@ -86,7 +86,7 @@ namespace mongo {
temp << "assertion " << file << ":" << line;
AssertionException e(temp.str(),0);
breakpoint();
-#if defined(_DEBUG) || defined(_DURABLEDEFAULTON)
+#if defined(_DEBUG) || defined(_DURABLEDEFAULTON) || defined(_DURABLEDEFAULTOFF)
// this is so we notice in buildbot
log() << "\n\n***aborting after assert() failure in a debug/test build\n\n" << endl;
abort();
@@ -103,7 +103,7 @@ namespace mongo {
temp << msgid;
AssertionException e(temp.str(),0);
breakpoint();
-#if defined(_DEBUG) || defined(_DURABLEDEFAULTON)
+#if defined(_DEBUG) || defined(_DURABLEDEFAULTON) || defined(_DURABLEDEFAULTOFF)
// this is so we notice in buildbot
log() << "\n\n***aborting after verify() failure in a debug/test build\n\n" << endl;
abort();