Commit Graph

5097 Commits

Author SHA1 Message Date
Andrew Wilcox
92df70cb48 Move login token code into the "RECONNECT TOKENS" section. 2013-12-05 13:11:39 -08:00
Andrew Wilcox
0e4ba1580d Underscore internal _getLoginToken and _setLoginToken.
`closeSessionsForTokens` doesn't need to clone `sessionsByLoginToken`
because `onClose` callbacks are deferred.

Simplify `closeTokensForUser` by using `_.pluck`.
2013-12-05 13:11:38 -08:00
Andrew Wilcox
2ae1ea495f Wrap calling session close callback in Meteor.defer, so that a bunch
of connections can be closed without waiting for the close callbacks
on one connection to return before closing the other connections.

Underscore internal Session field `_closeCallbacks`.

Update comment to explain the cause of the problem requiring the use
of `Meteor.bindEnvironment` with Meteor's public API.
2013-12-05 13:11:38 -08:00
Andrew Wilcox
e7f28645cd Remove remaining references to login token from livedata. 2013-12-05 13:11:38 -08:00
Andrew Wilcox
e63177346a Implement Meteor.server.onConnection and SessionHandle. 2013-12-05 13:11:38 -08:00
David Glasser
bc8d745d46 Merge branch 'oplog' into devel 2013-12-05 02:03:47 -08:00
David Glasser
276b4c0bb7 Merge branch 'devel' into oplog 2013-12-05 02:01:44 -08:00
Emily Stark
43648de7e5 Use array of args when applying reconnect 2013-12-04 22:05:28 -08:00
Emily Stark
a3abdfe8f9 Get rid of last vestiges of options for makeElectorTries 2013-12-04 21:27:06 -08:00
David Glasser
593d980ba6 implement 'test-packages --disable-oplog' 2013-12-04 12:54:27 -08:00
David Glasser
880cf37a3f New disable-oplog package 2013-12-04 12:46:47 -08:00
David Glasser
38e83bb139 implement cursor.find(s, {_disableOplog: true}) 2013-12-04 12:40:09 -08:00
David Glasser
643fbad4dc Move object check into _checkSupportedProjection
also ensure 'fields' is not an array
2013-12-04 11:56:21 -08:00
Emily Stark
18704dccaa Note in the docs that BrowserPolicy can only be used in server code 2013-12-04 10:40:49 -08:00
Slava Kim
534efb51e4 _checkSupportedProjection instead of _supportedProjection 2013-12-03 18:16:24 -08:00
Slava Kim
1b27b7cf14 Tests for an empty projection 2013-12-03 17:30:16 -08:00
Slava Kim
eeea007645 Move checks around 2013-12-03 17:28:56 -08:00
Slava Kim
fb2886d88a Don't use oplog tailing for queries with unsupported fields projection 2013-12-03 15:27:47 -08:00
David Glasser
52ff2df323 Merge branch 'devel' into oplog
Conflicts:
	packages/application-configuration/config.js
	packages/minimongo/minimongo.js
2013-12-03 15:01:37 -08:00
Slava Kim
001d2811d2 Throw on unsupported fields projection 2013-12-03 14:59:22 -08:00
David Glasser
6582a88608 Fix 0.6.6 regression in setting MAIL_URL
Also:
- ensure that AppConfig callbacks are always called at least once
- don't start a new AppConfig Fiber every time you call Email.send

Fixes #1649.
2013-12-03 14:49:38 -08:00
Slava Kim
5314ffedd3 Properly handle projections where '_id' is the only rule.
+ Tests. Fixes #1651

Conflicts:
	packages/minimongo/minimongo.js
2013-12-03 13:51:35 -08:00
Slava Kim
df95f1e914 Properly handle projections where '_id' is the only rule.
+ Tests. Fixes #1651
2013-12-03 13:39:50 -08:00
David Glasser
1189a7ae42 make connection._oplogHandle into a classy object 2013-12-02 19:17:43 -08:00
David Glasser
9abfffbb66 add "_observe_driver" to filenames 2013-12-02 19:17:42 -08:00
David Glasser
4ff3004e3c move more oplog stuff out of mongo_driver.js 2013-12-02 19:17:42 -08:00
David Glasser
aeac87285e rename to {Mongo,Oplog}ObserveDriver
Give a consistent constructor API betweent the two.
2013-12-02 19:17:42 -08:00
David Glasser
16cc4edc07 make OplogTailer a real class 2013-12-02 19:17:42 -08:00
David Glasser
cf665da9d4 Update comments in observeChangesWithOplog 2013-12-02 19:17:42 -08:00
David Glasser
a6fc84aed8 It's now OK for MongoPollster constructor to yield 2013-12-02 19:17:42 -08:00
David Glasser
4fa09c32cd extract MongoPollster to its own file 2013-12-02 19:17:42 -08:00
David Glasser
67f9ce8b84 stream ALL initial adds
simplify internal state of ObserveMultiplexer
2013-12-02 19:17:41 -08:00
Slava Kim
97043de7e4 Move LOGICAL_OPERATORS back to file scope 2013-12-02 19:17:41 -08:00
Slava Kim
2a4189a32a Move _combineSelectorAndProjection to a separate file
Move _isSelectorAffectedByModifier and _canSelectorBecomeTrueByModifier
Exctract server-only files and tests to server-only part of the package
2013-12-02 19:17:41 -08:00
David Glasser
5953b30897 Stuff from in-person code review 2013-12-02 19:17:41 -08:00
David Glasser
f50f88f83d Minimize _noYieldsAllowed block
Previously, observeChangesWithOplog was in it, and it can yield (if we
need to wait for the global oplog handle to be ready)
2013-12-02 19:17:41 -08:00
David Glasser
3a73ccdc38 Fix use of crossbar 2013-12-02 19:17:41 -08:00
David Glasser
8f664a1236 Use "selector matches specific IDs" code in oplog 2013-12-02 19:17:41 -08:00
David Glasser
58e1749104 De-singletonize InvalidationCrossbar 2013-12-02 19:17:40 -08:00
Slava Kim
9a24e33002 Use LocalCollection._canSelectorBecomeTrueByModifier in oplog fetching pruning 2013-12-02 19:17:40 -08:00
Slava Kim
604a48f64f Implement _canSelectorBecomeTrueByModifier
Is used to prune unnecessary fetches in oplog tailing.
2013-12-02 19:17:40 -08:00
David Glasser
b9511cad19 Stream initial adds to the first handle
(and to any other handles added before any initial adds come in)
2013-12-02 19:17:40 -08:00
David Glasser
de5a92d51f Add a comment and assertion to _sendAdds 2013-12-02 19:17:40 -08:00
David Glasser
9d59058963 Refactor observe dedup; support it for oplog. 2013-12-02 19:17:40 -08:00
David Glasser
1d3d38d6b1 Refactor observe-from-observe-changes
Specifically, factor out the logic that keeps a cache of the current
cursor contents from the part that calls observe callbacks.

Also:
- move IdMap from mongo-livedata to minimongo
- get rid of references to the 'moved' callback which no longer exists
2013-12-02 19:17:40 -08:00
David Glasser
2527766ad6 Move observe-from-observe-changes into own file 2013-12-02 19:17:39 -08:00
David Glasser
e9e39d2cb2 Rename $OPLOG_URL to $MONGO_OPLOG_URL 2013-12-02 19:17:39 -08:00
Slava Kim
3a06be789e Merge branch 'oplog-clever-fields' into oplog 2013-12-02 19:17:39 -08:00
Slava Kim
b3cd37af59 Fix typos 2013-12-02 19:17:39 -08:00
Slava Kim
cc260af22d Handle the $where operator in the selector and projection combination 2013-12-02 19:17:39 -08:00