Skip to content

Commit

Permalink
Merge branch 'release-0.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
glasser committed Nov 27, 2012
2 parents 16cf8a2 + 6635ae1 commit 067113a
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 14 deletions.
4 changes: 4 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion admin/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meteor (0.5.1-1) unstable; urgency=low
meteor (0.5.2-1) unstable; urgency=low

* Automated debian build.

Expand Down
2 changes: 1 addition & 1 deletion admin/install-s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## example.

URLBASE="https://d3sqy0vbqsdhku.cloudfront.net"
VERSION="0.5.1"
VERSION="0.5.2"
PKGVERSION="${VERSION}-1"

UNAME=`uname`
Expand Down
6 changes: 3 additions & 3 deletions admin/manifest.json
Original file line number Diff line number Diff line change
@@ -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"
}
2 changes: 1 addition & 1 deletion admin/meteor.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/lib/updater.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exports.CURRENT_VERSION = "0.5.1";
exports.CURRENT_VERSION = "0.5.2";

var fs = require("fs");
var http = require("http");
Expand Down
2 changes: 1 addition & 1 deletion app/meteor/post-upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion docs/client/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion docs/client/docs.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 13 additions & 4 deletions packages/mongo-livedata/mongo_driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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 ? [] : {};
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 067113a

Please sign in to comment.