Skip to content

Commit 780539f

Browse files
committed
make mongodump work on local.oplog.rs
1 parent f8b902e commit 780539f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tools/dump.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,14 @@ class Dump : public Tool {
5555
};
5656

5757
void doCollection( const string coll , ostream &out , ProgressMeter *m ) {
58-
Query q;
59-
if ( _query.isEmpty() && !hasParam("dbpath"))
60-
q.snapshot();
61-
else
62-
q = _query;
58+
Query q = _query;
6359

6460
int queryOptions = QueryOption_SlaveOk | QueryOption_NoCursorTimeout;
6561
if (startsWith(coll.c_str(), "local.oplog."))
6662
queryOptions |= QueryOption_OplogReplay;
67-
63+
else if ( _query.isEmpty() && !hasParam("dbpath"))
64+
q.snapshot();
65+
6866
DBClientBase& connBase = conn(true);
6967
Writer writer(out, m);
7068

0 commit comments

Comments
 (0)