summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2010-11-05 15:14:05 -0400
committerMathias Stearn <mathias@10gen.com>2010-11-05 15:14:55 -0400
commitef1c263192bd4adf5a95df4b12b5f31aa68801c8 (patch)
tree2dee37fcf4dc895ffbeb43b0b4e0fde8ba4c48dc /tools
parent5e927a1a30f0bf720c785049d6742c010a10e09c (diff)
downloadmongo-ef1c263192bd4adf5a95df4b12b5f31aa68801c8.tar.gz
Do indexes after data in mongorestore SERVER-1975
Diffstat (limited to 'tools')
-rw-r--r--tools/restore.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/restore.cpp b/tools/restore.cpp
index d44bbc061f4..d43b543840b 100644
--- a/tools/restore.cpp
+++ b/tools/restore.cpp
@@ -33,16 +33,15 @@ class Restore : public BSONTool {
public:
bool _drop;
- bool _indexesLast;
const char * _curns;
Restore() : BSONTool( "restore" ) , _drop(false){
add_options()
("drop" , "drop each collection before import" )
- ("indexesLast" , "wait to add indexes (faster if data isn't inserted in index order)" )
;
add_hidden_options()
("dir", po::value<string>()->default_value("dump"), "directory to restore from")
+ ("indexesLast" , "wait to add indexes (now default)") // left in for backwards compatibility
;
addPositionArg("dir", 1);
}
@@ -61,7 +60,6 @@ public:
}
_drop = hasParam( "drop" );
- _indexesLast = hasParam("indexesLast");
/* If _db is not "" then the user specified a db name to restore as.
*
@@ -106,7 +104,7 @@ public:
}
}
- if ( _indexesLast && p.leaf() == "system.indexes.bson" )
+ if ( p.leaf() == "system.indexes.bson" )
indexes = p;
else
drillDown(p, use_db, use_coll);