From 3d34e5b5ef3204013d269709b673842054bfd542 Mon Sep 17 00:00:00 2001 From: karayu Date: Tue, 26 Nov 2013 15:34:03 -0800 Subject: [PATCH 01/27] added meta description --- docs/client/docs.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/client/docs.html b/docs/client/docs.html index f1eefb41cb..77d03ee492 100644 --- a/docs/client/docs.html +++ b/docs/client/docs.html @@ -1,6 +1,8 @@ Documentation - Meteor + From 444c56f1bdf5e5bc0ae7d2e020720f9ac6a1d422 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Tue, 26 Nov 2013 15:44:44 -0800 Subject: [PATCH 02/27] upgrade docs to follower-11. --- docs/.meteor/release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.meteor/release b/docs/.meteor/release index 1b52537518..2d08b78d05 100644 --- a/docs/.meteor/release +++ b/docs/.meteor/release @@ -1 +1 @@ -galaxy-follower-6 +follower-11 From 09d129b7996fc0524745d110cf361e7c0cf8faff Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Wed, 11 Dec 2013 23:57:09 -0800 Subject: [PATCH 03/27] First pass text for oplog tailing in History.md. --- History.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 3306e46bd7..f13a291d3b 100644 --- a/History.md +++ b/History.md @@ -6,7 +6,17 @@ recommend using this precise version of Node in production so that the patch will be applied. If you use a newer version of Node with this version of Meteor, Meteor will not apply the patch and will instead disable websockets. -* XXX oplog tailing +* Rework how Meteor gets realtime database updates from MongoDB. Meteor + now reads the MongoDB "oplog" -- a special collection that records all + the write operations as they are applied to your database. This means + changes to the database are instantly noticed and reflected in Meteor, + whether they originated from Meteor or from an external database + client. Oplog tailing is automatically enabled in development mode + with `meteor run`, and can be enabled in production with the + `MONGO_OPLOG_URL` environment variable. Currently the only supported + selectors are equality checks; `$`-operators, `limit` and `skip` + queries fall back to the original poll-and-diff algorithm. See for details. * Add `Meteor.onConnection` and add `this.connection` to method invocations and publish functions. These can be used to store data From a244430f31dad5b3299e3b55e99fdc0daed016c0 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Wed, 11 Dec 2013 18:11:20 -0800 Subject: [PATCH 04/27] Handle modifications to EJSON custom types OplogObserveDriver cannot try to directly apply these representation-level mutations; it needs to get the entire custom type. This implementation is overly conservative, but in practice Meteor-originated writes shouldn't mutate EJSON custom types anyway (they should treat them as atomic). --- .../mongo-livedata/mongo_livedata_tests.js | 100 ++++++++++++++++++ .../mongo-livedata/oplog_observe_driver.js | 21 +++- 2 files changed, 118 insertions(+), 3 deletions(-) diff --git a/packages/mongo-livedata/mongo_livedata_tests.js b/packages/mongo-livedata/mongo_livedata_tests.js index 750d006122..299d34bbd6 100644 --- a/packages/mongo-livedata/mongo_livedata_tests.js +++ b/packages/mongo-livedata/mongo_livedata_tests.js @@ -2043,3 +2043,103 @@ Meteor.isServer && Tinytest.add("mongo-livedata - oplog - drop collection", func handle.stop(); }); + +var TestCustomType = function (head, tail) { + // use different field names on the object than in JSON, to ensure we are + // actually treating this as an opaque object. + this.myHead = head; + this.myTail = tail; +}; +_.extend(TestCustomType.prototype, { + clone: function () { + return new TestCustomType(this.myHead, this.myTail); + }, + equals: function (other) { + return other instanceof TestCustomType + && EJSON.equals(this.myHead, other.myHead) + && EJSON.equals(this.myTail, other.myTail); + }, + typeName: function () { + return 'someCustomType'; + }, + toJSONValue: function () { + return {head: this.myHead, tail: this.myTail}; + } +}); + +EJSON.addType('someCustomType', function (json) { + return new TestCustomType(json.head, json.tail); +}); + +testAsyncMulti("mongo-livedata - oplog - update inside EJSON", [ + function (test, expect) { + var self = this; + var collectionName = "ejson" + Random.id(); + if (Meteor.isClient) { + Meteor.call('createInsecureCollection', collectionName); + Meteor.subscribe('c-' + collectionName); + } + + self.collection = new Meteor.Collection(collectionName); + + self.id = self.collection.insert( + {name: 'foo', custom: new TestCustomType('a', 'b')}, + expect(function (err, res) { + test.isFalse(err); + test.equal(self.id, res); + })); + }, + function (test, expect) { + var self = this; + self.changes = []; + self.handle = self.collection.find({}).observeChanges({ + added: function (id, fields) { + self.changes.push(['a', id, fields]); + }, + changed: function (id, fields) { + self.changes.push(['c', id, fields]); + }, + removed: function (id) { + self.changes.push(['r', id]); + } + }); + test.length(self.changes, 1); + test.equal(self.changes.shift(), + ['a', self.id, + {name: 'foo', custom: new TestCustomType('a', 'b')}]); + + // First, replace the entire custom object. + // (runInFence is useful for the server, using expect() is useful for the + // client) + runInFence(function () { + self.collection.update( + self.id, {$set: {custom: new TestCustomType('a', 'c')}}, + expect(function (err) { + test.isFalse(err); + })); + }); + }, + function (test, expect) { + var self = this; + test.length(self.changes, 1); + test.equal(self.changes.shift(), + ['c', self.id, {custom: new TestCustomType('a', 'c')}]); + + // Now, sneakily replace just a piece of it. Meteor won't do this, but + // perhaps you are accessing Mongo directly. + runInFence(function () { + self.collection.update( + self.id, {$set: {'custom.EJSON$value.EJSONtail': 'd'}}, + expect(function (err) { + test.isFalse(err); + })); + }); + }, + function (test, expect) { + var self = this; + test.length(self.changes, 1); + test.equal(self.changes.shift(), + ['c', self.id, {custom: new TestCustomType('a', 'd')}]); + self.handle.stop(); + } +]); diff --git a/packages/mongo-livedata/oplog_observe_driver.js b/packages/mongo-livedata/oplog_observe_driver.js index 8fbc050d35..7e3da7d1f1 100644 --- a/packages/mongo-livedata/oplog_observe_driver.js +++ b/packages/mongo-livedata/oplog_observe_driver.js @@ -247,18 +247,25 @@ _.extend(OplogObserveDriver.prototype, { // replacement (in which case we can just directly re-evaluate the // selector)? var isReplace = !_.has(op.o, '$set') && !_.has(op.o, '$unset'); + // If this modifier modifies something inside an EJSON custom type (ie, + // anything with EJSON$), then we can't try to use + // LocalCollection._modify, since that just mutates the EJSON encoding, + // not the actual object. + var canDirectlyModifyDoc = + !isReplace && modifierCanBeDirectlyApplied(op.o); if (isReplace) { self._handleDoc(id, _.extend({_id: id}, op.o)); - } else if (self._published.has(id)) { + } else if (self._published.has(id) && canDirectlyModifyDoc) { // Oh great, we actually know what the document is, so we can apply // this directly. var newDoc = EJSON.clone(self._published.get(id)); newDoc._id = id; LocalCollection._modify(newDoc, op.o); self._handleDoc(id, self._sharedProjectionFn(newDoc)); - } else if (LocalCollection._canSelectorBecomeTrueByModifier( - self._cursorDescription.selector, op.o)) { + } else if (!canDirectlyModifyDoc || + LocalCollection._canSelectorBecomeTrueByModifier( + self._cursorDescription.selector, op.o)) { self._needToFetch.set(id, op.ts.toString()); if (self._phase === PHASE.STEADY) self._fetchModifiedDocuments(); @@ -480,4 +487,12 @@ OplogObserveDriver.cursorSupported = function (cursorDescription) { }); }; +var modifierCanBeDirectlyApplied = function (modifier) { + return _.all(modifier, function (fields, operation) { + return _.all(fields, function (value, field) { + return !/EJSON\$/.test(field); + }); + }); +}; + MongoTest.OplogObserveDriver = OplogObserveDriver; From 5ebf0f2ec34b4f981ff0e9e26a6a490acd856040 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Thu, 12 Dec 2013 14:39:18 -0800 Subject: [PATCH 05/27] Avoid 100% CPU in tailing during Mongo failover --- packages/mongo-livedata/mongo_driver.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/mongo-livedata/mongo_driver.js b/packages/mongo-livedata/mongo_driver.js index 948fcc397f..9d8063fa56 100644 --- a/packages/mongo-livedata/mongo_driver.js +++ b/packages/mongo-livedata/mongo_driver.js @@ -898,7 +898,7 @@ MongoConnection.prototype.tail = function (cursorDescription, docCallback) { var stopped = false; var lastTS = undefined; - Meteor.defer(function () { + var loop = function () { while (true) { if (stopped) return; @@ -930,9 +930,16 @@ MongoConnection.prototype.tail = function (cursorDescription, docCallback) { cursorDescription.collectionName, newSelector, cursorDescription.options)); + // Mongo failover takes many seconds. Retry in a bit. (Without this + // setTimeout, we peg the CPU at 100% and never notice the actual + // failover. + Meteor.setTimeout(loop, 100); + break; } } - }); + }; + + Meteor.defer(loop); return { stop: function () { From a5d5a03189300db0c50df29bed211e6a9a21e6f3 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Thu, 12 Dec 2013 15:17:32 -0800 Subject: [PATCH 06/27] Apply patch to node versions 0.10.22 and 0.10.23. 0.10.23 just came out and hasn't made any changes to the streams stuff we patch. --- History.md | 13 +++++++------ packages/meteor/node-issue-6506-workaround.js | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/History.md b/History.md index f13a291d3b..7538c3b436 100644 --- a/History.md +++ b/History.md @@ -1,10 +1,11 @@ -## vNEXT +## v0.6.7 -This version of Meteor contains a patch for a bug in Node 0.10 which most -commonly affects websockets. The patch is against Node v0.10.22. We strongly -recommend using this precise version of Node in production so that the patch -will be applied. If you use a newer version of Node with this version of Meteor, -Meteor will not apply the patch and will instead disable websockets. +This version of Meteor contains a patch for a bug in Node 0.10 which +most commonly affects websockets. The patch is against Node version +0.10.22 and 0.10.23. We strongly recommend using one of these precise +versions of Node in production so that the patch will be applied. If you +use a newer version of Node with this version of Meteor, Meteor will not +apply the patch and will instead disable websockets. * Rework how Meteor gets realtime database updates from MongoDB. Meteor now reads the MongoDB "oplog" -- a special collection that records all diff --git a/packages/meteor/node-issue-6506-workaround.js b/packages/meteor/node-issue-6506-workaround.js index b4c640e70b..a08b92a9d8 100644 --- a/packages/meteor/node-issue-6506-workaround.js +++ b/packages/meteor/node-issue-6506-workaround.js @@ -1,13 +1,13 @@ // Temporary workaround for https://github.com/joyent/node/issues/6506 // Our fix involves replicating a bunch of files in order to // -if (process.version !== 'v0.10.22') { +if (process.version !== 'v0.10.22' && process.version !== 'v0.10.23') { if (!process.env.DISABLE_WEBSOCKETS) { console.error("This version of Meteor contains a patch for a bug in Node v0.10."); - console.error("The patch is against v0.10.22."); + console.error("The patch is against only versions 0.10.22 and 0.10.23."); console.error("You are using version " + process.version + " instead, so we cannot apply the patch."); console.error("To mitigate the most common effect of the bug, websockets will be disabled."); - console.error("To enable websockets, use Node v0.10.22 or upgrade to a later version of Meteor (if available)."); + console.error("To enable websockets, use Node v0.10.22 or .23, or upgrade to a later version of Meteor (if available)."); process.env.DISABLE_WEBSOCKETS = 't'; } } else { From 71ca231c2b0c352a1e298b91218b6dea1c5b2b8b Mon Sep 17 00:00:00 2001 From: David Glasser Date: Thu, 12 Dec 2013 16:10:41 -0800 Subject: [PATCH 07/27] Take out check that can fail during failover --- packages/mongo-livedata/oplog_tailing.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/mongo-livedata/oplog_tailing.js b/packages/mongo-livedata/oplog_tailing.js index 66d6874e65..1a123b0035 100644 --- a/packages/mongo-livedata/oplog_tailing.js +++ b/packages/mongo-livedata/oplog_tailing.js @@ -134,22 +134,15 @@ _.extend(OplogHandle.prototype, { return; } + + // Insert the future into our list. Almost always, this will be at the end, + // but it's conceivable that if we fail over from one primary to another, + // the oplog entries we see will go backwards. var insertAfter = self._catchingUpFutures.length; while (insertAfter - 1 > 0 && self._catchingUpFutures[insertAfter - 1].ts.greaterThan(ts)) { insertAfter--; } - - // XXX this can occur if we fail over from one primary to another. so this - // check needs to be removed before we merge oplog. that said, it has been - // helpful so far at proving that we are properly using poolSize 1. Also, we - // could keep something like it if we could actually detect failover; see - // https://github.com/mongodb/node-mongodb-native/issues/1120 - if (insertAfter !== self._catchingUpFutures.length) { - throw Error("found misordered oplog: " - + showTS(_.last(self._catchingUpFutures).ts) + " vs " - + showTS(ts)); - } var f = new Future; self._catchingUpFutures.splice(insertAfter, 0, {ts: ts, future: f}); f.wait(); From a536b64c82070428b105ac685920ec7ca47ad9d1 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Thu, 12 Dec 2013 16:20:27 -0800 Subject: [PATCH 08/27] A few History tweaks --- History.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/History.md b/History.md index 7538c3b436..8e5d4c96dd 100644 --- a/History.md +++ b/History.md @@ -27,7 +27,7 @@ apply the patch and will instead disable websockets. * Rework hot code push. The new `autoupdate` package drives automatic reloads on update using standard DDP messages instead of a hardcoded message at DDP startup. Now the hot code push only triggers when - client code changes; server only code changes will not cause the page + client code changes; server-only code changes will not cause the page to reload. * New 'facts' package publishes internal statistics about Meteor. @@ -67,7 +67,7 @@ apply the patch and will instead disable websockets. * Support `EJSON.clone` for `Meteor.Error`. As a result, they are properly stringified in DDP even if thrown through a `Future`. #1482 -* Fix passing `transform: null` option to `Collection.find()` to disable +* Fix passing `transform: null` option to `collection.allow()` to disable transformation in validators. #1659 * Fix livedata error on `this.removed` during session shutdown. #1540 #1553 @@ -97,7 +97,7 @@ apply the patch and will instead disable websockets. * uglify-js from a fork of 2.4.0 to 2.4.7 Patches contributed by GitHub users AlexeyMK, awwx, dandv, -DenisGorbachev, FooBarWidget, mitar, mcbain, rzymek, sdarnell. +DenisGorbachev, FooBarWidget, mitar, mcbain, rzymek, and sdarnell. ## v0.6.6.3 From 9d5fb4d1e10d0510a7555f2780d72b3d428a3848 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Fri, 13 Dec 2013 02:19:13 -0800 Subject: [PATCH 09/27] upgrade examples and docs. --- docs/.meteor/release | 2 +- examples/leaderboard/.meteor/release | 2 +- examples/parties/.meteor/release | 2 +- examples/todos/.meteor/release | 2 +- examples/wordplay/.meteor/release | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/.meteor/release b/docs/.meteor/release index 1b52537518..bb2638e6b6 100644 --- a/docs/.meteor/release +++ b/docs/.meteor/release @@ -1 +1 @@ -galaxy-follower-6 +0.6.7-rc1 diff --git a/examples/leaderboard/.meteor/release b/examples/leaderboard/.meteor/release index b65d3d9aeb..bb2638e6b6 100644 --- a/examples/leaderboard/.meteor/release +++ b/examples/leaderboard/.meteor/release @@ -1 +1 @@ -0.6.6.2 +0.6.7-rc1 diff --git a/examples/parties/.meteor/release b/examples/parties/.meteor/release index b65d3d9aeb..bb2638e6b6 100644 --- a/examples/parties/.meteor/release +++ b/examples/parties/.meteor/release @@ -1 +1 @@ -0.6.6.2 +0.6.7-rc1 diff --git a/examples/todos/.meteor/release b/examples/todos/.meteor/release index b65d3d9aeb..bb2638e6b6 100644 --- a/examples/todos/.meteor/release +++ b/examples/todos/.meteor/release @@ -1 +1 @@ -0.6.6.2 +0.6.7-rc1 diff --git a/examples/wordplay/.meteor/release b/examples/wordplay/.meteor/release index b65d3d9aeb..bb2638e6b6 100644 --- a/examples/wordplay/.meteor/release +++ b/examples/wordplay/.meteor/release @@ -1 +1 @@ -0.6.6.2 +0.6.7-rc1 From de6fb4276da05da6cb3b5920001a790d4c2b33d4 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Fri, 13 Dec 2013 02:19:34 -0800 Subject: [PATCH 10/27] update displayed release version number for docs. --- docs/lib/release-override.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/lib/release-override.js b/docs/lib/release-override.js index 7ee3b0eafc..8b66d7eea5 100644 --- a/docs/lib/release-override.js +++ b/docs/lib/release-override.js @@ -1,5 +1,5 @@ // While galaxy apps are on their own special meteor releases, override // Meteor.release here. if (Meteor.isClient) { - Meteor.release = Meteor.release ? "0.6.6.3" : undefined; + Meteor.release = Meteor.release ? "0.6.7" : undefined; } From fd215633cc32498b7b189716c1fedac514d40ea4 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Thu, 12 Dec 2013 16:43:12 -0800 Subject: [PATCH 11/27] Make observe driver facts names consistent --- packages/mongo-livedata/oplog_observe_driver.js | 4 ++-- packages/mongo-livedata/polling_observe_driver.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/mongo-livedata/oplog_observe_driver.js b/packages/mongo-livedata/oplog_observe_driver.js index 7e3da7d1f1..ac2094ba75 100644 --- a/packages/mongo-livedata/oplog_observe_driver.js +++ b/packages/mongo-livedata/oplog_observe_driver.js @@ -26,7 +26,7 @@ OplogObserveDriver = function (options) { self._stopHandles = []; Package.facts && Package.facts.Facts.incrementServerFact( - "mongo-livedata", "oplog-observers", 1); + "mongo-livedata", "observe-drivers-oplog", 1); self._phase = PHASE.QUERYING; @@ -435,7 +435,7 @@ _.extend(OplogObserveDriver.prototype, { self._listenersHandle = null; Package.facts && Package.facts.Facts.incrementServerFact( - "mongo-livedata", "oplog-observers", -1); + "mongo-livedata", "observe-drivers-oplog", -1); } }); diff --git a/packages/mongo-livedata/polling_observe_driver.js b/packages/mongo-livedata/polling_observe_driver.js index 938798e519..82020f2147 100644 --- a/packages/mongo-livedata/polling_observe_driver.js +++ b/packages/mongo-livedata/polling_observe_driver.js @@ -72,7 +72,7 @@ PollingObserveDriver = function (options) { self._unthrottledEnsurePollIsScheduled(); Package.facts && Package.facts.Facts.incrementServerFact( - "mongo-livedata", "mongo-pollsters", 1); + "mongo-livedata", "observe-drivers-polling", 1); }; _.extend(PollingObserveDriver.prototype, { @@ -174,6 +174,6 @@ _.extend(PollingObserveDriver.prototype, { self._stopped = true; _.each(self._stopCallbacks, function (c) { c(); }); Package.facts && Package.facts.Facts.incrementServerFact( - "mongo-livedata", "mongo-pollsters", -1); + "mongo-livedata", "observe-drivers-polling", -1); } }); From 8b37c0084d18f47c50169464807b277e7b48b5f3 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Thu, 12 Dec 2013 16:02:02 -0800 Subject: [PATCH 12/27] Make facts automatically subscribe when you show the template. Also, namespace the collection and subscription name. --- History.md | 5 +++-- packages/facts/facts.js | 22 ++++++++++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/History.md b/History.md index 8e5d4c96dd..6bb2fe51e5 100644 --- a/History.md +++ b/History.md @@ -30,8 +30,9 @@ apply the patch and will instead disable websockets. client code changes; server-only code changes will not cause the page to reload. -* New 'facts' package publishes internal statistics about Meteor. - XXX how to use +* New 'facts' package publishes internal statistics about Meteor. To + use, simply `meteor add facts` then add `{{> serverFacts}}` somewhere + in your interface. * Add an explicit check that publish functions return a cursor, an array of cursors, or a falsey value. This is a safety check to to prevent diff --git a/packages/facts/facts.js b/packages/facts/facts.js index 65f4517530..543023b271 100644 --- a/packages/facts/facts.js +++ b/packages/facts/facts.js @@ -1,6 +1,6 @@ Facts = {}; -var serverFactsCollection = 'Facts.server'; +var serverFactsCollection = 'meteor_Facts_server'; if (Meteor.isServer) { // By default, we publish facts to no user if autopublish is off, and to all @@ -45,7 +45,7 @@ if (Meteor.isServer) { // called? Meteor.defer(function () { // XXX Also publish facts-by-package. - Meteor.publish("facts", function () { + Meteor.publish("meteor_facts", function () { var sub = this; if (!userIdFilter(this.userId)) { sub.ready(); @@ -59,13 +59,10 @@ if (Meteor.isServer) { activeSubscriptions = _.without(activeSubscriptions, sub); }); sub.ready(); - }); + }, {is_auto: true}); }); } else { Facts.server = new Meteor.Collection(serverFactsCollection); - // XXX making all clients subscribe all the time is wasteful. - // add an interface here - // Meteor.subscribe("facts"); Template.serverFacts.factsByPackage = function () { return Facts.server.find(); @@ -78,4 +75,17 @@ if (Meteor.isServer) { }); return factArray; }; + + // Subscribe when the template is first made, and unsubscribe when it + // is removed. If for some reason puts two copies of the template on + // the screen at once, we'll subscribe twice. Meh. + Template.serverFacts.created = function () { + this._stopHandle = Meteor.subscribe("meteor_facts"); + }; + Template.serverFacts.destroyed = function () { + if (this._stopHandle) { + this._stopHandle.stop(); + this._stopHandle = null; + } + }; } From 20e8e4241c68d526257515f9f83412d615df86d6 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Fri, 13 Dec 2013 03:46:11 -0800 Subject: [PATCH 13/27] Retry subscription on error. --- packages/autoupdate/autoupdate_client.js | 61 ++++++++++++++++++------ packages/livedata/livedata_common.js | 5 ++ 2 files changed, 51 insertions(+), 15 deletions(-) diff --git a/packages/autoupdate/autoupdate_client.js b/packages/autoupdate/autoupdate_client.js index 34e90184f9..dfd4063ddd 100644 --- a/packages/autoupdate/autoupdate_client.js +++ b/packages/autoupdate/autoupdate_client.js @@ -43,19 +43,50 @@ Autoupdate.newClientAvailable = function () { }; -Meteor.subscribe("meteor_autoupdate_clientVersions", { - onError: function (error) { - Meteor._debug("autoupdate subscription failed:", error); - }, - onReady: function () { - if (Package.reload) { - Deps.autorun(function (computation) { - if (ClientVersions.findOne({current: true}) && - (! ClientVersions.findOne({_id: autoupdateVersion}))) { - computation.stop(); - Package.reload.Reload._reload(); - } - }); - } - } + +// XXX Livedata exporting this via DDP is a hack. See +// packages/livedata/livedata_common.js +var retry = new DDP._Retry({ + // Unlike the stream reconnect use of Retry, which we want to be instant + // in normal operation, this is a wacky failure. We don't want to retry + // right away, we can start slowly. + // + // A better way than timeconstants here might be to use the knowledge + // of when we reconnect to help trigger these retries. Typically, the + // server fixing code will result in a restart and reconnect, but + // potentially the subscription could have a transient error. + minCount: 0, // don't do any immediate retries + baseTimeout: 30*1000 // start with 30s }); +var failures = 0; + +Autoupdate._retrySubscription = function () { + Meteor.subscribe("meteor_autoupdate_clientVersions", { + onError: function (error) { + Meteor._debug("autoupdate subscription failed:", error); + failures++; + retry.retryLater(failures, function () { + // Just retry making the subscription, don't reload the whole + // page. While reloading would catch more cases (for example, + // the server went back a version and is now doing old-style hot + // code push), it would also be more prone to reload loops, + // which look really bad to the user. Just retrying the + // subscription over DDP means it is at least possible to fix by + // updating the server. + Autoupdate._retrySubscription(); + }); + }, + onReady: function () { + if (Package.reload) { + Deps.autorun(function (computation) { + if (ClientVersions.findOne({current: true}) && + (! ClientVersions.findOne({_id: autoupdateVersion}))) { + computation.stop(); + Package.reload.Reload._reload(); + } + }); + } + } + }); +}; +Autoupdate._retrySubscription(); diff --git a/packages/livedata/livedata_common.js b/packages/livedata/livedata_common.js index 9c3d31bc78..f0b6159ec6 100644 --- a/packages/livedata/livedata_common.js +++ b/packages/livedata/livedata_common.js @@ -115,3 +115,8 @@ stringifyDDP = function (msg) { // state in the DDP session. Meteor.setTimeout and friends clear // it. We can probably find a better way to factor this. DDP._CurrentInvocation = new Meteor.EnvironmentVariable; + + +// This is private and a hack. It is used by autoupdate_client. We +// should refactor. Maybe a separate 'exponential-backoff' package? +DDP._Retry = Retry; From 2f745bb52f010c487027406a621e76705878b525 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Thu, 12 Dec 2013 00:38:20 -0800 Subject: [PATCH 14/27] Test changing Date and ObjectID --- .../mongo-livedata/mongo_livedata_tests.js | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/packages/mongo-livedata/mongo_livedata_tests.js b/packages/mongo-livedata/mongo_livedata_tests.js index 299d34bbd6..1f163b4e4b 100644 --- a/packages/mongo-livedata/mongo_livedata_tests.js +++ b/packages/mongo-livedata/mongo_livedata_tests.js @@ -2071,7 +2071,7 @@ EJSON.addType('someCustomType', function (json) { return new TestCustomType(json.head, json.tail); }); -testAsyncMulti("mongo-livedata - oplog - update inside EJSON", [ +testAsyncMulti("mongo-livedata - oplog - update EJSON", [ function (test, expect) { var self = this; var collectionName = "ejson" + Random.id(); @@ -2081,9 +2081,12 @@ testAsyncMulti("mongo-livedata - oplog - update inside EJSON", [ } self.collection = new Meteor.Collection(collectionName); + self.date = new Date; + self.objId = new Meteor.Collection.ObjectID; self.id = self.collection.insert( - {name: 'foo', custom: new TestCustomType('a', 'b')}, + {d: self.date, oi: self.objId, + custom: new TestCustomType('a', 'b')}, expect(function (err, res) { test.isFalse(err); test.equal(self.id, res); @@ -2106,7 +2109,8 @@ testAsyncMulti("mongo-livedata - oplog - update inside EJSON", [ test.length(self.changes, 1); test.equal(self.changes.shift(), ['a', self.id, - {name: 'foo', custom: new TestCustomType('a', 'b')}]); + {d: self.date, oi: self.objId, + custom: new TestCustomType('a', 'b')}]); // First, replace the entire custom object. // (runInFence is useful for the server, using expect() is useful for the @@ -2140,6 +2144,24 @@ testAsyncMulti("mongo-livedata - oplog - update inside EJSON", [ test.length(self.changes, 1); test.equal(self.changes.shift(), ['c', self.id, {custom: new TestCustomType('a', 'd')}]); + + // Update a date and an ObjectID too. + self.date2 = new Date(self.date.valueOf() + 1000); + self.objId2 = new Meteor.Collection.ObjectID; + runInFence(function () { + self.collection.update( + self.id, {$set: {d: self.date2, oi: self.objId2}}, + expect(function (err) { + test.isFalse(err); + })); + }); + }, + function (test, expect) { + var self = this; + test.length(self.changes, 1); + test.equal(self.changes.shift(), + ['c', self.id, {d: self.date2, oi: self.objId2}]); + self.handle.stop(); } ]); From 2991ac931221dc43b11444ebea189e854944628d Mon Sep 17 00:00:00 2001 From: David Glasser Date: Wed, 11 Dec 2013 23:37:16 -0800 Subject: [PATCH 15/27] fix missing expect() call in password-tests add a console.trace that helps debug it --- packages/accounts-password/password_tests.js | 4 ++-- packages/tinytest/tinytest.js | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/accounts-password/password_tests.js b/packages/accounts-password/password_tests.js index 1da7dff9a4..fc71e0d317 100644 --- a/packages/accounts-password/password_tests.js +++ b/packages/accounts-password/password_tests.js @@ -464,10 +464,10 @@ if (Meteor.isClient) (function () { function (test, expect) { var self = this; // Test that deleting a user logs out that user's connections. - Meteor.loginWithPassword(this.username, this.password, function (err) { + Meteor.loginWithPassword(this.username, this.password, expect(function (err) { test.isFalse(err); Meteor.call("removeUser", self.username); - }); + })); }, waitForLoggedOutStep ]); diff --git a/packages/tinytest/tinytest.js b/packages/tinytest/tinytest.js index 66c6d42063..de212efb50 100644 --- a/packages/tinytest/tinytest.js +++ b/packages/tinytest/tinytest.js @@ -309,7 +309,16 @@ _.extend(TestCase.prototype, { return true; }; - var results = new TestCaseResults(self, onEvent, + var wrappedOnEvent = function (e) { + // If this trace prints, it means you ran some test.* function after the + // test finished! Another symptom will be that the test will display as + // "waiting" even when it counts as passed or failed. + if (completed) + console.trace("event after complete!"); + return onEvent(e); + }; + + var results = new TestCaseResults(self, wrappedOnEvent, function (e) { if (markComplete()) onException(e); From 9dfa0ee95f98b792c3d8895ec8634aea6535a7d6 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Wed, 11 Dec 2013 20:38:51 -0800 Subject: [PATCH 16/27] Update tools tests for Webapp bundled asset change 6eccf8c --- tools/tests/test_bundler_options.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/tests/test_bundler_options.js b/tools/tests/test_bundler_options.js index b3affcbe0c..76a5b0a382 100644 --- a/tools/tests/test_bundler_options.js +++ b/tools/tests/test_bundler_options.js @@ -34,8 +34,8 @@ assert.doesNotThrow(function () { // verify that contents are minified var appHtml = fs.readFileSync(path.join(tmpOutputDir, "programs", "client", "app.html"), 'utf8'); - assert(/src=\"##ROOT_URL_PATH_PREFIX##\/[0-9a-f]{40,40}.js\"/.test(appHtml)); - assert(!(/src=\"##ROOT_URL_PATH_PREFIX##\/packages/.test(appHtml))); + assert(/src=\"##BUNDLED_JS_CSS_PREFIX##\/[0-9a-f]{40,40}.js\"/.test(appHtml)); + assert(!(/src=\"##BUNDLED_JS_CSS_PREFIX##\/packages/.test(appHtml))); }); console.log("nodeModules: 'skip', no minify"); @@ -50,11 +50,11 @@ assert.doesNotThrow(function () { // verify that contents are not minified var appHtml = fs.readFileSync(path.join(tmpOutputDir, "programs", "client", "app.html"), 'utf8'); - assert(!(/src=\"##ROOT_URL_PATH_PREFIX##\/[0-9a-f]{40,40}.js\"/.test(appHtml))); - assert(/src=\"##ROOT_URL_PATH_PREFIX##\/packages\/meteor/.test(appHtml)); - assert(/src=\"##ROOT_URL_PATH_PREFIX##\/packages\/deps/.test(appHtml)); + assert(!(/src=\"##BUNDLED_JS_CSS_PREFIX##\/[0-9a-f]{40,40}.js\"/.test(appHtml))); + assert(/src=\"##BUNDLED_JS_CSS_PREFIX##\/packages\/meteor/.test(appHtml)); + assert(/src=\"##BUNDLED_JS_CSS_PREFIX##\/packages\/deps/.test(appHtml)); // verify that tests aren't included - assert(!(/src=\"##ROOT_URL_PATH_PREFIX##\/package-tests\/meteor/.test(appHtml))); + assert(!(/src=\"##BUNDLED_JS_CSS_PREFIX##\/package-tests\/meteor/.test(appHtml))); }); console.log("nodeModules: 'skip', no minify, testPackages: ['meteor']"); @@ -70,7 +70,7 @@ assert.doesNotThrow(function () { // verify that tests for the meteor package are included var appHtml = fs.readFileSync(path.join(tmpOutputDir, "programs", "client", "app.html")); - assert(/src=\"##ROOT_URL_PATH_PREFIX##\/packages\/meteor:tests\.js/.test(appHtml)); + assert(/src=\"##BUNDLED_JS_CSS_PREFIX##\/packages\/meteor:tests\.js/.test(appHtml)); }); console.log("nodeModules: 'copy'"); From a6c8b5eef3f67b712fc010fb6b4def497b028573 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sun, 15 Dec 2013 19:40:57 -0800 Subject: [PATCH 17/27] Give up on documenting facts current api. --- History.md | 4 +--- packages/facts/package.js | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/History.md b/History.md index 6bb2fe51e5..925f6a5e94 100644 --- a/History.md +++ b/History.md @@ -30,9 +30,7 @@ apply the patch and will instead disable websockets. client code changes; server-only code changes will not cause the page to reload. -* New 'facts' package publishes internal statistics about Meteor. To - use, simply `meteor add facts` then add `{{> serverFacts}}` somewhere - in your interface. +* New 'facts' package publishes internal statistics about Meteor. * Add an explicit check that publish functions return a cursor, an array of cursors, or a falsey value. This is a safety check to to prevent diff --git a/packages/facts/package.js b/packages/facts/package.js index 1f835c15fe..f36b50d054 100644 --- a/packages/facts/package.js +++ b/packages/facts/package.js @@ -1,5 +1,6 @@ Package.describe({ - summary: "Publish internal app statistics" + summary: "Publish internal app statistics", + internal: true }); Package.on_use(function (api) { From cce9d36dfaa3b50a894db4ed267a8ae2e5ba87a0 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Thu, 12 Dec 2013 15:55:06 -0800 Subject: [PATCH 18/27] Add some XXX comments about when we should re-poll --- packages/mongo-livedata/oplog_observe_driver.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/mongo-livedata/oplog_observe_driver.js b/packages/mongo-livedata/oplog_observe_driver.js index ac2094ba75..dbd44c310b 100644 --- a/packages/mongo-livedata/oplog_observe_driver.js +++ b/packages/mongo-livedata/oplog_observe_driver.js @@ -294,6 +294,15 @@ _.extend(OplogObserveDriver.prototype, { // In various circumstances, we may just want to stop processing the oplog and // re-run the initial query, just as if we were a PollingObserveDriver. + // + // XXX We should call this when we detect that we've been in FETCHING for "too + // long". + // + // XXX We should call this when we detect Mongo failover (since that might + // mean that some of the oplog entries we have processed have been rolled + // back). The Node Mongo driver is in the middle of a bunch of huge + // refactorings, including the way that it notifies you when primary + // changes. Will put off implementing this until driver 1.4 is out. _pollQuery: function () { var self = this; From e042e5a85a0fb38b51637aee2715564272ec1fdc Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 16 Dec 2013 15:14:43 -0800 Subject: [PATCH 19/27] Fix "drop collection" test failure There was a race condition in the manipulation of the write fence by the drop collection code. Specifically, when seeing a "drop collection" oplog entry, OplogObserveDriver took no immediate action and instead deferred some "should I re-poll now or later?" logic. This allowed the write fence's oplogHandle.waitUntilCaughtUp code to think that everything was "caught up" even though the effects of the "drop collection" entry had not yet affected the cursor's state (by transitioning it away from the STEADY state). The fix is to ensure that the state-change aspects of processing the entry occur immediately; the actual re-query is still deferred in order to not block the oplog tailer from continuing. Reported by: @awwx (The previous failure can made consistently reproducible by replacing the `Meteor.defer` that is removed by this commit with a `Meteor.setTimeout(,200)`.) --- .../mongo-livedata/oplog_observe_driver.js | 39 ++++++++++++------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/packages/mongo-livedata/oplog_observe_driver.js b/packages/mongo-livedata/oplog_observe_driver.js index dbd44c310b..e4bbaccb73 100644 --- a/packages/mongo-livedata/oplog_observe_driver.js +++ b/packages/mongo-livedata/oplog_observe_driver.js @@ -55,11 +55,10 @@ OplogObserveDriver = function (options) { trigger, function (notification) { var op = notification.op; if (notification.dropCollection) { - // Defer because it may block on "wait for oplog to catch up", which - // isn't kosher for an oplog entry handler (will cause deadlock). - Meteor.defer(function () { - self._needToPollQuery(); - }); + // Note: this call is not allowed to block on anything (especially on + // waiting for oplog entries to catch up) because that will block + // onOplogEntry! + self._needToPollQuery(); } else { // All other operators should be handled depending on phase if (self._phase === PHASE.QUERYING) @@ -295,6 +294,9 @@ _.extend(OplogObserveDriver.prototype, { // In various circumstances, we may just want to stop processing the oplog and // re-run the initial query, just as if we were a PollingObserveDriver. // + // This function may not block, because it is called from an oplog entry + // handler. + // // XXX We should call this when we detect that we've been in FETCHING for "too // long". // @@ -315,18 +317,27 @@ _.extend(OplogObserveDriver.prototype, { ++self._fetchGeneration; // ignore any in-flight fetches self._phase = PHASE.QUERYING; - // subtle note: _published does not contain _id fields, but newResults does - var newResults = new LocalCollection._IdMap; - var cursor = self._cursorForQuery(); - cursor.forEach(function (doc) { - newResults.set(doc._id, doc); + // Defer so that we don't block. + Meteor.defer(function () { + // subtle note: _published does not contain _id fields, but newResults + // does + var newResults = new LocalCollection._IdMap; + var cursor = self._cursorForQuery(); + cursor.forEach(function (doc) { + newResults.set(doc._id, doc); + }); + + self._publishNewResults(newResults); + + self._doneQuerying(); }); - - self._publishNewResults(newResults); - - self._doneQuerying(); }, + // Transitions to QUERYING and runs another query, or (if already in QUERYING) + // ensures that we will query again later. + // + // This function may not block, because it is called from an oplog entry + // handler. _needToPollQuery: function () { var self = this; if (self._stopped) From 2859e30e60dd740d77e005d1df4b3815bef1231f Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 16 Dec 2013 20:25:48 -0800 Subject: [PATCH 20/27] A few more History.md things --- History.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/History.md b/History.md index 925f6a5e94..37670e5d5f 100644 --- a/History.md +++ b/History.md @@ -22,7 +22,7 @@ apply the patch and will instead disable websockets. * Add `Meteor.onConnection` and add `this.connection` to method invocations and publish functions. These can be used to store data associated with individual clients between subscriptions and method - calls. See http://docs.meteor.com/#meteor_onconnection for details. + calls. See http://docs.meteor.com/#meteor_onconnection for details. #1611 * Rework hot code push. The new `autoupdate` package drives automatic reloads on update using standard DDP messages instead of a hardcoded @@ -51,13 +51,16 @@ apply the patch and will instead disable websockets. connections, kill DDP connections, and finish all outstanding requests for static assets. +* In the HTTP server, only keep sockets with no active HTTP requests alive for 5 + seconds. + * Fix handling of `fields` option in minimongo when only `_id` is present. #1651 * Fix issue where setting `process.env.MAIL_URL` in app code would not - alter where mail was sent. This was a regression from 0.6.6. #1649 + alter where mail was sent. This was a regression in 0.6.6 from 0.6.5. #1649 -* Prompt for passwords on stderr instead of stdout for easier automation - in shell scripts. #1600 +* Use stderr instead of stdout (for easier automation in shell scripts) when + prompting for passwords and when downloading the dev bundle. #1600 * Bundler failures cause non-zero exit code in `meteor run`. #1515 @@ -94,9 +97,10 @@ apply the patch and will instead disable websockets. * MongoDB from 2.4.6 to 2.4.8 * clean-css from 1.1.2 to 2.0.2 * uglify-js from a fork of 2.4.0 to 2.4.7 + * handlebars npm module no longer available outside of handlebars package -Patches contributed by GitHub users AlexeyMK, awwx, dandv, -DenisGorbachev, FooBarWidget, mitar, mcbain, rzymek, and sdarnell. +Patches contributed by GitHub users AlexeyMK, awwx, dandv, DenisGorbachev, +emgee3, FooBarWidget, mitar, mcbain, rzymek, and sdarnell. ## v0.6.6.3 From 46fb7b6d214c089984a26be6c8558be2e0b0e4da Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 16 Dec 2013 20:40:34 -0800 Subject: [PATCH 21/27] LICENSE update (script follows!) find . -name 'node_modules' | grep -v .meteor | xargs ls | cat | grep -ve '^\.' | sort | uniq > bar for i in `cat bar` ; do echo -n "$i " grep -e "^$i:" LICENSE.txt || echo "NOT FOUND" done --- LICENSE.txt | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index ce588a1a86..420c8c773e 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -217,6 +217,7 @@ Copyright (c) 2011 Esa-Matti Suuronen esa-matti@suuronen.org ---------- node-gyp: https://github.com/TooTallNate/node-gyp keypress: https://github.com/TooTallNate/keypress +bindings: https://github.com/TooTallNate/node-bindings ---------- Copyright (c) 2012 Nathan Rajlich @@ -542,6 +543,14 @@ geojson-utils: https://github.com/maxogden/geojson-js-utils Copyright (c) 2010 Max Ogden + +---------- +bcrypt: https://github.com/ncb000gt/node.bcrypt.js +---------- + +Copyright (c) 2010 Nicholas Campbell + + ============== Apache License ============== @@ -641,11 +650,10 @@ BSD Licenses ============ ---------- -uglify-js: https://github.com/mishoo/UglifyJS +uglify-js: https://github.com/mishoo/UglifyJS2 ---------- -Copyright 2010 (c) Mihai Bazon -Based on parse-js (http://marijn.haverbeke.nl/parse-js/). +Copyright 2012-2013 (c) Mihai Bazon Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -1263,6 +1271,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------- npm-user-validate: https://github.com/robertkowalski/npm-user-validate +github-url-from-username-repo: https://github.com/robertkowalski/github-url-from-username-repo ---------- Copyright (c) Robert Kowalski @@ -1738,7 +1747,9 @@ The externally maintained libraries used by libuv are: ---------- nodejs: http://nodejs.org/ -readable-stream: https://github.com/isaacs/readable-stream/ +readable-stream: https://github.com/isaacs/readable-stream +npm: https://github.com/isaacs/npm +init-package-json: https://github.com/isaacs/init-package-json ---------- From a0734bfe58970547781090ead70ff9bd914130df Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Tue, 17 Dec 2013 01:42:49 -0800 Subject: [PATCH 22/27] strawman banner.txt and notices. --- scripts/admin/banner.txt | 7 ++++--- scripts/admin/notices.json | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/admin/banner.txt b/scripts/admin/banner.txt index 99a12572dc..78e71c8c36 100644 --- a/scripts/admin/banner.txt +++ b/scripts/admin/banner.txt @@ -1,5 +1,6 @@ -=> Meteor 0.6.6.3: Fix CPU runaway while watching files in large - projects and occasional server crash on session disconnect. +=> Meteor 0.6.7: featuring a new live database driver that uses Mongo's + database replication log to watch queries more efficiently without + requerying the database on each update. This release is being downloaded in the background. Update your - project to Meteor 0.6.6.3 by running 'meteor update'. + project to Meteor 0.6.7 by running 'meteor update'. diff --git a/scripts/admin/notices.json b/scripts/admin/notices.json index b15c708877..6e7d3e323d 100644 --- a/scripts/admin/notices.json +++ b/scripts/admin/notices.json @@ -72,6 +72,9 @@ { "release": "0.6.6.3" }, + { + "release": "0.6.7" + }, { "release": "NEXT" } From 9cb6df57fb9537ce2cbee868efbb684772f56b98 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Tue, 17 Dec 2013 01:51:49 -0800 Subject: [PATCH 23/27] Link to wiki page in History. --- History.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 37670e5d5f..da4ec32d9f 100644 --- a/History.md +++ b/History.md @@ -16,8 +16,9 @@ apply the patch and will instead disable websockets. with `meteor run`, and can be enabled in production with the `MONGO_OPLOG_URL` environment variable. Currently the only supported selectors are equality checks; `$`-operators, `limit` and `skip` - queries fall back to the original poll-and-diff algorithm. See for details. + queries fall back to the original poll-and-diff algorithm. See + https://github.com/meteor/meteor/wiki/Oplog-Observe-Driver + for details. * Add `Meteor.onConnection` and add `this.connection` to method invocations and publish functions. These can be used to store data From 4771b7173446eec9c2fbb94ef8b5d5ca6437c2c3 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 17 Dec 2013 10:48:54 -0800 Subject: [PATCH 24/27] Rename 0.6.7 to 0.7.0 --- docs/lib/release-override.js | 2 +- packages/livedata/stream_server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/lib/release-override.js b/docs/lib/release-override.js index 8b66d7eea5..0f61b680aa 100644 --- a/docs/lib/release-override.js +++ b/docs/lib/release-override.js @@ -1,5 +1,5 @@ // While galaxy apps are on their own special meteor releases, override // Meteor.release here. if (Meteor.isClient) { - Meteor.release = Meteor.release ? "0.6.7" : undefined; + Meteor.release = Meteor.release ? "0.7.0" : undefined; } diff --git a/packages/livedata/stream_server.js b/packages/livedata/stream_server.js index 436d891dd3..8367eb2708 100644 --- a/packages/livedata/stream_server.js +++ b/packages/livedata/stream_server.js @@ -74,7 +74,7 @@ StreamServer = function () { // XXX COMPAT WITH 0.6.6. Send the old style welcome message, which // will force old clients to reload. Remove this once we're not - // concerned about people upgrading from a pre-0.6.7 release. Also, + // concerned about people upgrading from a pre-0.7.0 release. Also, // remove the clause in the client that ignores the welcome message // (livedata_connection.js) socket.send(JSON.stringify({server_id: "0"})); From 8bd400e56065b0f2d61e18dd220becb6a2bf7ac8 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Tue, 17 Dec 2013 10:49:35 -0800 Subject: [PATCH 25/27] lets do 0.7.0 instead --- History.md | 2 +- scripts/admin/banner.txt | 7 +++---- scripts/admin/notices.json | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/History.md b/History.md index da4ec32d9f..e4ff101642 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,4 @@ -## v0.6.7 +## v0.7.0 This version of Meteor contains a patch for a bug in Node 0.10 which most commonly affects websockets. The patch is against Node version diff --git a/scripts/admin/banner.txt b/scripts/admin/banner.txt index 78e71c8c36..def13df77b 100644 --- a/scripts/admin/banner.txt +++ b/scripts/admin/banner.txt @@ -1,6 +1,5 @@ -=> Meteor 0.6.7: featuring a new live database driver that uses Mongo's - database replication log to watch queries more efficiently without - requerying the database on each update. +=> Meteor 0.7.0: use MongoDB's operations log to observe equality + queries instead of polling the database server on each update. This release is being downloaded in the background. Update your - project to Meteor 0.6.7 by running 'meteor update'. + project to Meteor 0.7.0 by running 'meteor update'. diff --git a/scripts/admin/notices.json b/scripts/admin/notices.json index 6e7d3e323d..ab41d828c8 100644 --- a/scripts/admin/notices.json +++ b/scripts/admin/notices.json @@ -73,7 +73,7 @@ "release": "0.6.6.3" }, { - "release": "0.6.7" + "release": "0.7.0" }, { "release": "NEXT" From dbdab6a15657b15b8bd4d4af76d16c746c96051c Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 17 Dec 2013 11:00:07 -0800 Subject: [PATCH 26/27] Formatting improvements to History --- History.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/History.md b/History.md index e4ff101642..98e61ba25f 100644 --- a/History.md +++ b/History.md @@ -31,7 +31,7 @@ apply the patch and will instead disable websockets. client code changes; server-only code changes will not cause the page to reload. -* New 'facts' package publishes internal statistics about Meteor. +* New `facts` package publishes internal statistics about Meteor. * Add an explicit check that publish functions return a cursor, an array of cursors, or a falsey value. This is a safety check to to prevent @@ -41,14 +41,14 @@ apply the patch and will instead disable websockets. * Implement `$each`, `$sort`, and `$slice` options for minimongo's `$push` modifier. #1492 -* Introduce '--raw-logs' option to `meteor run` to disable log +* Introduce `--raw-logs` option to `meteor run` to disable log coloring and timestamps. * Add `WebAppInternals.setBundledJsCssPrefix()` to control where the client loads bundled JavaScript and CSS files. This allows serving files from a CDN to decrease page load times and reduce server load. -* Attempt to exit cleanly on 'SIGHUP'. Stop accepting incoming +* Attempt to exit cleanly on `SIGHUP`. Stop accepting incoming connections, kill DDP connections, and finish all outstanding requests for static assets. From b6c7d424bc73456b64180d730272a9ed18562359 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 17 Dec 2013 11:08:19 -0800 Subject: [PATCH 27/27] Update examples and docs to 0.7.0 --- docs/.meteor/release | 2 +- examples/leaderboard/.meteor/release | 2 +- examples/parties/.meteor/release | 2 +- examples/todos/.meteor/release | 2 +- examples/wordplay/.meteor/release | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/.meteor/release b/docs/.meteor/release index bb2638e6b6..faef31a435 100644 --- a/docs/.meteor/release +++ b/docs/.meteor/release @@ -1 +1 @@ -0.6.7-rc1 +0.7.0 diff --git a/examples/leaderboard/.meteor/release b/examples/leaderboard/.meteor/release index bb2638e6b6..faef31a435 100644 --- a/examples/leaderboard/.meteor/release +++ b/examples/leaderboard/.meteor/release @@ -1 +1 @@ -0.6.7-rc1 +0.7.0 diff --git a/examples/parties/.meteor/release b/examples/parties/.meteor/release index bb2638e6b6..faef31a435 100644 --- a/examples/parties/.meteor/release +++ b/examples/parties/.meteor/release @@ -1 +1 @@ -0.6.7-rc1 +0.7.0 diff --git a/examples/todos/.meteor/release b/examples/todos/.meteor/release index bb2638e6b6..faef31a435 100644 --- a/examples/todos/.meteor/release +++ b/examples/todos/.meteor/release @@ -1 +1 @@ -0.6.7-rc1 +0.7.0 diff --git a/examples/wordplay/.meteor/release b/examples/wordplay/.meteor/release index bb2638e6b6..faef31a435 100644 --- a/examples/wordplay/.meteor/release +++ b/examples/wordplay/.meteor/release @@ -1 +1 @@ -0.6.7-rc1 +0.7.0