Permalink
Browse files

Merge branch 'release-0.5.2'

  • Loading branch information...
2 parents 16cf8a2 + 6635ae1 commit 067113a37dd4e7824db1a16d5f7a90c3739eed9c @glasser glasser committed Nov 27, 2012
View
@@ -1,6 +1,10 @@
## vNEXT
+## v0.5.2
+
+* Fix 0.5.1 regression: Cursor `observe` works during server startup. #507
+
## v0.5.1
* Speed up server-side subscription handling by avoiding redundant work
View
@@ -1,4 +1,4 @@
-meteor (0.5.1-1) unstable; urgency=low
+meteor (0.5.2-1) unstable; urgency=low
* Automated debian build.
View
@@ -5,7 +5,7 @@
## example.
URLBASE="https://d3sqy0vbqsdhku.cloudfront.net"
-VERSION="0.5.1"
+VERSION="0.5.2"
PKGVERSION="${VERSION}-1"
UNAME=`uname`
View
@@ -1,6 +1,6 @@
{
- "version": "0.5.1",
- "deb_version": "0.5.1-1",
- "rpm_version": "0.5.1-1",
+ "version": "0.5.2",
+ "deb_version": "0.5.2-1",
+ "rpm_version": "0.5.2-1",
"urlbase": "https://d3sqy0vbqsdhku.cloudfront.net"
}
View
@@ -5,7 +5,7 @@
Summary: Meteor platform and JavaScript application server
Vendor: Meteor
Name: meteor
-Version: 0.5.1
+Version: 0.5.2
Release: 1
License: MIT
Group: Networking/WWW
View
@@ -1,4 +1,4 @@
-exports.CURRENT_VERSION = "0.5.1";
+exports.CURRENT_VERSION = "0.5.2";
var fs = require("fs");
var http = require("http");
@@ -2,7 +2,7 @@ try {
// XXX can't get this from updater.js because in 0.3.7 and before the
// updater didn't have the right NODE_PATH set. At some point we can
// remove this and just use updater.CURRENT_VERSION.
- var VERSION = "0.5.1";
+ var VERSION = "0.5.2";
var fs = require('fs');
var path = require('path');
View
@@ -11,7 +11,7 @@
</div>
<div id="main">
<div id="top"></div>
- <h1 class="main-headline">Meteor 0.5.1</h1>
+ <h1 class="main-headline">Meteor 0.5.2</h1>
{{> introduction }}
{{> concepts }}
{{> api }}
View
@@ -1,4 +1,4 @@
-METEOR_VERSION = "0.5.1";
+METEOR_VERSION = "0.5.2";
Meteor.startup(function () {
// XXX this is broken by the new multi-page layout. Also, it was
@@ -490,7 +490,7 @@ _Mongo.prototype._observe = function (cursorDescription, ordered, callbacks) {
// take place.
liveResultsSet = new LiveResultsSet(
cursorDescription,
- self._createSynchronousCursor(cursorDescription),
+ self,
ordered,
function () {
delete self._liveResultsSets[observeKey];
@@ -516,15 +516,19 @@ _Mongo.prototype._observe = function (cursorDescription, ordered, callbacks) {
return observeHandle;
};
-var LiveResultsSet = function (cursorDescription, synchronousCursor, ordered,
+var LiveResultsSet = function (cursorDescription, mongoHandle, ordered,
stopCallback) {
var self = this;
self._cursorDescription = cursorDescription;
- self._synchronousCursor = synchronousCursor;
+ self._mongoHandle = mongoHandle;
self._ordered = ordered;
self._stopCallbacks = [stopCallback];
+ // This constructor cannot yield, so we don't create the synchronousCursor yet
+ // (since that can yield).
+ self._synchronousCursor = null;
+
// previous results snapshot. on each poll cycle, diffs against
// results drives the callbacks.
self._results = ordered ? [] : {};
@@ -679,7 +683,12 @@ _.extend(LiveResultsSet.prototype, {
self._pendingWrites = [];
// Get the new query results. (These calls can yield.)
- self._synchronousCursor.rewind();
+ if (self._synchronousCursor) {
+ self._synchronousCursor.rewind();
+ } else {
+ self._synchronousCursor = self._mongoHandle._createSynchronousCursor(
+ self._cursorDescription);
+ }
var newResults = self._synchronousCursor.getRawObjects(self._ordered);
var oldResults = self._results;

0 comments on commit 067113a

Please sign in to comment.