Skip to content

Commit

Permalink
Allow set env var METEOR_OPLOG_TOO_FAR_BEHIND (#14017)
Browse files Browse the repository at this point in the history
* Allow set env var METEOR_OPLOG_TOO_FAR_BEHIND

Co-Authored-By: rodrigok <rodrigoknascimento@gmail.com>
  • Loading branch information
rodrigok authored and sampaiodiego committed Apr 6, 2019
1 parent 54cac43 commit 40fed25
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/models/server/models/_BaseDb.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ export class BaseDb extends EventEmitter {
};

MongoInternals.defaultRemoteCollectionDriver().mongo._oplogHandle.onOplogEntry(query, this.processOplogRecord.bind(this));
MongoInternals.defaultRemoteCollectionDriver().mongo._oplogHandle._defineTooFarBehind(Number.MAX_SAFE_INTEGER);
// Meteor will handle if we have a value https://github.com/meteor/meteor/blob/5dcd0b2eb9c8bf881ffbee98bc4cb7631772c4da/packages/mongo/oplog_tailing.js#L5
if (process.env.METEOR_OPLOG_TOO_FAR_BEHIND == null) {
MongoInternals.defaultRemoteCollectionDriver().mongo._oplogHandle._defineTooFarBehind(Number.MAX_SAFE_INTEGER);
}
}
}
});
Expand Down

0 comments on commit 40fed25

Please sign in to comment.