mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-28868 Set noCursorTimeout option on cursor in checkOplogs().
This commit is contained in:
parent
4d6ac4793f
commit
ba040d4d48
@ -1442,8 +1442,10 @@ var ReplSetTest = function(opts) {
|
||||
this.query = function(ts) {
|
||||
var coll = this.getOplogColl();
|
||||
var query = {ts: {$gte: ts ? ts : new Timestamp()}};
|
||||
// Set the cursor to read backwards, from last to first.
|
||||
this.cursor = coll.find(query).sort({$natural: -1});
|
||||
// Set the cursor to read backwards, from last to first. We also set the cursor not
|
||||
// to time out since it may take a while to process each batch and a test may have
|
||||
// changed "cursorTimeoutMillis" to a short time period.
|
||||
this.cursor = coll.find(query).sort({$natural: -1}).noCursorTimeout();
|
||||
};
|
||||
|
||||
this.getFirstDoc = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user