mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
When initializing oplog tailing, only read 'ts'
This means we read less data (yay), but more importantly it means that if the last entry contained custom EJSON types, we don't try to parse them. This code gets called synchronously from the first Meteor.Collection constructor, which can legitimately be before your EJSON.addType call. Fixes #2018.
This commit is contained in:
@@ -176,7 +176,7 @@ _.extend(OplogHandle.prototype, {
|
||||
|
||||
// Find the last oplog entry.
|
||||
var lastOplogEntry = self._oplogLastEntryConnection.findOne(
|
||||
OPLOG_COLLECTION, {}, {sort: {$natural: -1}});
|
||||
OPLOG_COLLECTION, {}, {sort: {$natural: -1}, fields: {ts: 1}});
|
||||
|
||||
var oplogSelector = _.clone(self._baseOplogSelector);
|
||||
if (lastOplogEntry) {
|
||||
|
||||
Reference in New Issue
Block a user