Commit Graph

6100 Commits

Author SHA1 Message Date
Sashko Stubailo
f29c954458 Bump a bunch of version numbers for new preview 2015-02-09 13:23:24 -08:00
Mitar
40575dde25 Missing dependency. 2015-02-08 19:02:12 -08:00
Dan Dascalescu
63d069e138 Syntax highlight for the reactive-dict README example 2015-02-08 19:00:42 -08:00
David Glasser
8e8ee3eca4 Unregister ObserveMultiplexer before stop
It's maybe possible that stop() yields, and in general is more complex.
Since the ObserveMultiplexer is already at the point where it will not
be able to start running again, we should remove it from the registry
first.
2015-02-07 00:02:42 -08:00
David Glasser
9166de39fe Release write fences on PollingObserveDriver.stop
OplogObserveDriver.stop() already does this.
2015-02-07 00:01:20 -08:00
David Glasser
25d9ab8250 Improve error message in PollingObserveDriver
Now when we get an error from Mongo, the cursor description is included.

Other than by the test-only _resumePolling, _pollMongo is only called at
the top level of an async-queued task, so the previously thrown error
never did anything other than print the exception (from within
_SynchronousQueue) anyway.

Fixes #1633.

(See also #2534.)
2015-02-06 19:21:30 -08:00
David Glasser
eaf11fa55e Update Node Mongo driver from 1.4.1 to 1.4.30
and BSON from 0.2.7 to 0.2.18

This is past the minimum version required to use the upcoming MongoDB
3.0.

Fixes #3654.
2015-02-06 18:05:16 -08:00
David Glasser
2e4d3f2833 Don't use system.replset to check for replset
It requires an unnecessary level of permissions in Mongo 2.6.  Instead,
use the isMaster command plus parsing the URL.

Fixes #2121.
2015-02-05 22:40:45 -08:00
David Glasser
5936c0b3de Add a link to a comment about upsert 2015-02-05 22:40:44 -08:00
David Glasser
a83008ebb4 Make our upserts match 2.6 semantics
Mongo 2.4 had the following behavior: if

  c.update({_id: 'x'}, {y: 1}, {upsert: 1})

resulted in an insert, it would get a random _id instead of 'x'.  (This
only happened when the update was a "replacement" rather than a
"modifier".) We dutifully implemented this behavior in various parts of
Meteor and added tests to prove that it occured.

However, this was actually a bug which got fixed in Mongo 2.6:
https://jira.mongodb.org/browse/SERVER-5289

Since this was regarded by Mongo as a bug (not a backwards-incompatible
change deemed worthy of mention in the Mongo 2.6 release notes), we
should just make Meteor always behave the Mongo 2.6 way, no matter what
version we're on (at least in the aspects where Meteor has its own code
to control this).  In other parts of Meteor where the queries are just
getting processed by Mongo, the behavior of this special case will match
Mongo's behavior.  If you care strongly about consistent behavior in
this strange edge case, upgrade to Mongo 2.6!

Specifically:

 - The minimongo implementation of modifiers loses its special-case code
   which drops _id from the modified document during an upsert replace.
 - Mongo.Collection.update should only generate a random _id as an
   insertedId if the selector doesn't mention one.
 - The case of a selector mentioning _id and a *replacement* modifier
   not mentioning _id should still count as "known ID" in the
   lower-level MongoConnection.update, which means that there's no
   reason to use simulated upsert and that we should include it as
   insertedId in the return object.
 - Various tests of the previous behavior should be changed.

(Note that if this commit is cherry-picked onto 1.0.3.1 (ie, run against
2.4), it would fail, because some of the tested cases end up going to
unsimulated Mongo upsert and assume the 2.6 behavior. That's OK, as
described above.)

Fixes #2278.
2015-02-05 22:40:44 -08:00
David Glasser
ceb07b254e upsert: Detect "can't change _id" in Mongo 2.6
This fixes the "upsert error parse" test and changes the behavior of
other failing upsert tests to be failing with "Upsert failed after 3
tries" errors instead of failing with a "can't change _id"-style error.

First step of addressing #2278.
2015-02-05 22:40:44 -08:00
David Glasser
d9cfa85b48 Fix test depending on Mongo document key order
In Mongo 2.6, _id always comes first:
http://docs.mongodb.org/manual/release-notes/2.6/#insert-and-update-improvements
2015-02-05 22:40:44 -08:00
Sashko Stubailo
a75cae93ed Merge branch 'devel' into windows-r
Conflicts:
	packages/package-version-parser/package.js
	tools/bundler.js
	tools/server/boot.js
2015-02-04 15:50:31 -08:00
Slava Kim
73341e6bad bump 2015-02-04 15:35:36 -08:00
Sashko Stubailo
486495aed8 Remove documentation: null 2015-02-04 14:41:12 -08:00
Sashko Stubailo
e0c24cf7e4 Reapply PVP fix that we lost in merge from devel 2015-02-04 14:33:08 -08:00
Sashko Stubailo
b3cb7a49f7 Merge branch 'devel' into windows-cr
Conflicts:
	packages/application-configuration/package.js
	packages/ctl-helper/package.js
	packages/ctl/package.js
	packages/dev-bundle-fetcher/package.js
	packages/follower-livedata/package.js
	packages/jquery/package.js
	packages/star-translate/package.js
	packages/test-in-browser/package.js
	tools/bundler.js
	tools/compiler.js
	tools/package-client.js
	tools/package-source.js
	tools/package-version-parser.js
	tools/server/boot.js
2015-02-04 13:56:54 -08:00
Sashko Stubailo
843c280a59 Add comment about files methods in minifiers 2015-02-04 12:05:27 -08:00
Denis Gorbachev
44bbd7f34c Cleanup Minimongo.Matcher instantiation
We've actually been wrapping our head over passing collection to Minimongo.Matcher before realizing that it doesn't really use the second argument.
2015-02-03 13:22:28 -08:00
Slava Kim
f4aa4f9037 bump 2015-02-02 20:17:09 -08:00
Slava Kim
a46d590a96 Move tiny-profile to tools to avoid circular dependencies 2015-02-02 19:10:09 -08:00
Sashko Stubailo
f4601b8355 Bump versions 2015-02-02 14:12:10 -08:00
Andrew Wilcox
60c52bd2c8 Tiny profiler package 2015-02-02 13:50:28 -08:00
Slava Kim
3c68cebf0d bump 2015-02-02 13:38:01 -08:00
David Greenspan
45752e3203 parseConstraint -> parsePackageConstraint
In the return value, `name` has been changed to `package`,
and `vConstraint` is now `versionConstraint`.

`constraint.package` is better than `constraint.name`, where
`constraint` is a PackageConstraint.  It's also more consistent
with functions like parsePackageAtVersion which return an object
like `{package, version}`.

`vConstraint` was too cryptic.

Changes were discussed with Glasser in a code review.

Troposphere does not call parseConstraint or work with constraint
objects, so it doesn't need to change.

This is a breaking change to the package-version-parser API (or one
method of it, at least), but it is considered an internal API so we
are not worrying too much about it.
2015-02-02 13:13:31 -08:00
Slava Kim
d7a8f44da9 Merge branch 'windows-cr' into windows-r
Fixes by @stubailo for the general code-review
2015-02-02 10:21:26 -08:00
Sashko Stubailo
bc4696454a New version 2015-02-02 10:08:05 -08:00
Sashko Stubailo
1a522e428d Fix slashes 2015-01-30 11:58:49 -08:00
Sashko Stubailo
8149538e9c stop underscore from failing on non-existent function
For Template.body, there is no template instance, so the _.bind inside helpers
fails
2015-01-29 19:33:55 -08:00
Sashko Stubailo
000467711b Bump package versions 2015-01-29 17:36:04 -08:00
David Glasser
dde3924c9d Make MongoConnection constructor always wait
Summary:
Previously, the MongoConnection constructor (which gets called
implicitly the first time you make a Mongo.Collection) would wait for a
successful connection before returning ... if an oplog URL is supplied.
If not in oplog mode, it would return before the connection is
successful, and the first subsequent calls that actually tried to do
something with the DB would block instead.

Having an inconsistent API that is sometimes sync and sometimes async is
not very clear.  Moreover, error handling from connect was strange.
Prior to 0.8.1 (24a0006c), connect errors would be thrown
uncatchably (ie, from an unrelated context).  Starting with 0.8.1,
connect errors would effectively be ignored due to the new
bindEnvironment (they'd be logged, but all code would continue
normally).

It's pretty important that startup connection errors crash the server
process instead of letting it keep running unproductively.  And it would
also be nice if those errors could be caught (if you're making a
MongoConnection in your own code).  So this change ensures that
connection errors get thrown by the MongoConnection constructor.

Fixes #3038.

Test Plan: new unit test. manual test with MONGO_URL=xxx

Reviewers: ben

Subscribers: justinsb

Differential Revision: https://phabricator.meteor.io/D19
2015-01-29 16:56:22 -08:00
David Glasser
299f413617 Remove support code for legacy systems
Summary:
What I'm looking for here is: attention to the few parts that aren't just
deletions (eg in auth.js), and thoughts about if removing any of these things
might break systems I haven't thought about.

Test Plan: test-packages, self-test (which mostly passes)

Reviewers: ekatek

Differential Revision: https://phabricator.meteor.io/D18
2015-01-29 14:03:41 -08:00
David Glasser
aff7f37d04 Remove legacy follower-livedata package 2015-01-29 14:03:28 -08:00
David Glasser
5990e71ddc Remove legacy AppConfig code
Nothing ever made full use of the promise of the complexity of the
API (configuration that can change at runtime) anyway.

This includes completely ignoring the $APP_CONFIG variable.

I opened GitHub issues against the only Atmosphere packages that had
dependencies on application-configuration (none of which actually used
the package other than by declaring the dependency).
2015-01-29 14:03:20 -08:00
David Glasser
7c40c3c5a6 Remove legacy proxy-binding
Also remove SIGHUP handler. This was designed for a legacy system, and
SIGHUP would be a better fit for what autoupdate currently uses SIGUSR2
for.  This includes removing some code in the ddp server to close
sockets on SIGHUP.
2015-01-29 14:03:11 -08:00
David Glasser
62037959fe Clean up comments about legacy code 2015-01-29 14:03:11 -08:00
David Glasser
0e0dfed6a8 Remove "control program" support
This was support code for a now unused system.
2015-01-29 14:03:10 -08:00
David Glasser
15b2569f79 Update READMEs of things we're about to delete 2015-01-29 13:52:11 -08:00
David Greenspan
361a80c243 Changes from Glasser code review
Includes all discussed changes except:
- Checking for troposphere PVP compatibility
- "vConstraint" -> "versionConstraint"
- "name" -> "package" in utils.parsePackageAtVersion
2015-01-28 16:45:01 -08:00
Sashko Stubailo
07dc77ee5c Mention that the test tests helpers as well 2015-01-28 11:28:55 -08:00
Sashko Stubailo
58d921e926 Test in browser doesn't need docs right now
Conflicts:
	packages/test-in-browser/package.js
2015-01-28 11:06:28 -08:00
Sashko Stubailo
d2d05bedf5 Improve comment 2015-01-28 10:15:23 -08:00
Sashko Stubailo
06de4ae803 Merge branch 'event-current-data' into devel
Merge #3546

Use separate dynamic variable to track Template.instance(), and use
Blaze.currentView for Template.currentData() in event handlers
2015-01-28 10:12:35 -08:00
Sashko Stubailo
7201dbe84c Fix broked COMPAT comment 2015-01-28 10:06:38 -08:00
David Glasser
f8f90f949c Add a comment explaining why this file is so weird 2015-01-27 17:48:33 -08:00
Ronen Babayoff
eeb95efaed Add no-ops for Meteor.publish, methods, and onConnection if no webapp 2015-01-27 17:45:22 -08:00
Sashko Stubailo
fee892c43e Merge pull request #3550 from romanzolotarev/patch-1
Update README.md
2015-01-27 11:58:06 -08:00
Avital Oliver
f2840103ca Tests for Template.currentData and Template.parentData
A recent change fixed the behavior of `Template.currentData`
and `Template.parentData` in event handlers and helpers.
These are tests for the new, correct behavior.

(The old behavior read the data of the template instance.
The new behavior read the data context around the DOM node
where the event or helper ran)
2015-01-26 16:44:50 -08:00
Sashko Stubailo
b0ecad0ce2 Fix documentation of Template.currentData 2015-01-26 16:16:30 -08:00
David Glasser
1829cfee15 Remove obsoleted comment 2015-01-26 15:55:50 -08:00